kaitai-struct-compiler 0.11.0-SNAPSHOT20240403.134844.751f059 → 0.11.0-SNAPSHOT20240610.172038.27d5020
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 +724 -537
- 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$();
|
|
@@ -2344,42 +2364,10 @@ $c_Lio_kaitai_struct_Main$.prototype.precompile__Lio_kaitai_struct_format_ClassS
|
|
|
2344
2364
|
var typeValidatorProblems = new $c_Lio_kaitai_struct_precompile_TypeValidator(specs).run__sc_Iterable();
|
|
2345
2365
|
var styleWarnings = new $c_Lio_kaitai_struct_precompile_StyleCheckIds(specs).run__sc_Iterable();
|
|
2346
2366
|
var encodingProblems = new $c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames(specs).run__sc_Iterable();
|
|
2347
|
-
var this$4 = $n(
|
|
2348
|
-
var
|
|
2349
|
-
var
|
|
2350
|
-
|
|
2351
|
-
var n = $n(this$4.scm_HashMap__f_scala$collection$mutable$HashMap$$table).get(i);
|
|
2352
|
-
if ((n !== null)) {
|
|
2353
|
-
var this$5 = $n(n);
|
|
2354
|
-
var _$this = this$5;
|
|
2355
|
-
while (true) {
|
|
2356
|
-
var _1 = $n(_$this).scm_HashMap$Node__f__key;
|
|
2357
|
-
var _2 = $n(_$this).scm_HashMap$Node__f__value;
|
|
2358
|
-
$as_T(_1);
|
|
2359
|
-
var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(_2);
|
|
2360
|
-
try {
|
|
2361
|
-
$n(typeSpec).Lio_kaitai_struct_format_ClassSpec__f_parentClass = $m_Lio_kaitai_struct_format_GenericStructClassSpec$()
|
|
2362
|
-
} catch (e) {
|
|
2363
|
-
if ((e instanceof $c_Lio_kaitai_struct_problems_CompilationProblemException)) {
|
|
2364
|
-
var cpe = $as_Lio_kaitai_struct_problems_CompilationProblemException(e);
|
|
2365
|
-
throw $n($n(cpe).localizedInType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_problems_CompilationProblemException(typeSpec))
|
|
2366
|
-
} else {
|
|
2367
|
-
throw e
|
|
2368
|
-
}
|
|
2369
|
-
};
|
|
2370
|
-
if (($n(_$this).scm_HashMap$Node__f__next !== null)) {
|
|
2371
|
-
_$this = $n(_$this).scm_HashMap$Node__f__next;
|
|
2372
|
-
continue
|
|
2373
|
-
};
|
|
2374
|
-
break
|
|
2375
|
-
}
|
|
2376
|
-
};
|
|
2377
|
-
i = ((1 + i) | 0)
|
|
2378
|
-
};
|
|
2379
|
-
var this$6 = $n(resolveTypeProblems);
|
|
2380
|
-
var this$7 = $n($as_sc_IterableOps(this$6.concat__sc_IterableOnce__O(typeValidatorProblems)));
|
|
2381
|
-
var this$8 = $n($as_sc_IterableOps(this$7.concat__sc_IterableOnce__O(styleWarnings)));
|
|
2382
|
-
return $as_sc_Iterable(this$8.concat__sc_IterableOnce__O(encodingProblems))
|
|
2367
|
+
var this$4 = $n(resolveTypeProblems);
|
|
2368
|
+
var this$5 = $n($as_sc_IterableOps(this$4.concat__sc_IterableOnce__O(typeValidatorProblems)));
|
|
2369
|
+
var this$6 = $n($as_sc_IterableOps(this$5.concat__sc_IterableOnce__O(styleWarnings)));
|
|
2370
|
+
return $as_sc_Iterable(this$6.concat__sc_IterableOnce__O(encodingProblems))
|
|
2383
2371
|
});
|
|
2384
2372
|
$c_Lio_kaitai_struct_Main$.prototype.compile__Lio_kaitai_struct_format_ClassSpecs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_languages_components_LanguageCompilerStatic__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_CompileLog$SpecSuccess = (function(specs, spec, lang, conf) {
|
|
2385
2373
|
var config = $p_Lio_kaitai_struct_Main$__updateConfigFromMeta__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_RuntimeConfig(this, conf, $n(spec).Lio_kaitai_struct_format_ClassSpec__f_meta);
|
|
@@ -2599,40 +2587,38 @@ function $h_Lio_kaitai_struct_TypeProcessor$() {
|
|
|
2599
2587
|
/*<skip>*/
|
|
2600
2588
|
}
|
|
2601
2589
|
$h_Lio_kaitai_struct_TypeProcessor$.prototype = $c_Lio_kaitai_struct_TypeProcessor$.prototype;
|
|
2602
|
-
$c_Lio_kaitai_struct_TypeProcessor$.prototype.
|
|
2590
|
+
$c_Lio_kaitai_struct_TypeProcessor$.prototype.getExternalTypes__Lio_kaitai_struct_format_ClassSpec__sc_Iterable = (function(curClass) {
|
|
2603
2591
|
var res = $as_scm_Set($m_scm_Set$().apply__sci_Seq__O($m_sci_Nil$()));
|
|
2604
|
-
var this$
|
|
2605
|
-
var
|
|
2606
|
-
|
|
2592
|
+
var this$1 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_seq);
|
|
2593
|
+
var these = this$1;
|
|
2594
|
+
while ((!$n(these).isEmpty__Z())) {
|
|
2595
|
+
var arg1 = $n(these).head__O();
|
|
2596
|
+
var attr = $as_Lio_kaitai_struct_format_AttrSpec(arg1);
|
|
2607
2597
|
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
|
-
}
|
|
2598
|
+
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);
|
|
2599
|
+
this$2.addAll__sc_IterableOnce__scm_HashSet(xs);
|
|
2600
|
+
these = $as_sci_List($n(these).tail__O())
|
|
2625
2601
|
};
|
|
2626
|
-
var this$
|
|
2627
|
-
var
|
|
2602
|
+
var this$3 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_params);
|
|
2603
|
+
var these$1 = this$3;
|
|
2604
|
+
while ((!$n(these$1).isEmpty__Z())) {
|
|
2605
|
+
var arg1$1 = $n(these$1).head__O();
|
|
2606
|
+
var param = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$1);
|
|
2607
|
+
var this$4 = $n(res);
|
|
2608
|
+
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);
|
|
2609
|
+
this$4.addAll__sc_IterableOnce__scm_HashSet(xs$1);
|
|
2610
|
+
these$1 = $as_sci_List($n(these$1).tail__O())
|
|
2611
|
+
};
|
|
2612
|
+
var this$6 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_instances);
|
|
2613
|
+
var f = new $c_sjsr_AnonFunction1(((x0$1$2) => {
|
|
2628
2614
|
var x0$1 = $as_T2(x0$1$2);
|
|
2629
2615
|
if ((x0$1 !== null)) {
|
|
2630
2616
|
var inst = $as_Lio_kaitai_struct_format_InstanceSpec($n(x0$1).T2__f__2);
|
|
2631
2617
|
if ((inst instanceof $c_Lio_kaitai_struct_format_ParseInstanceSpec)) {
|
|
2632
2618
|
var x2 = $as_Lio_kaitai_struct_format_ParseInstanceSpec(inst);
|
|
2633
|
-
var this$
|
|
2634
|
-
var xs$
|
|
2635
|
-
return this$
|
|
2619
|
+
var this$5 = $n(res);
|
|
2620
|
+
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);
|
|
2621
|
+
return this$5.addAll__sc_IterableOnce__scm_HashSet(xs$2)
|
|
2636
2622
|
} else {
|
|
2637
2623
|
return $m_s_None$()
|
|
2638
2624
|
}
|
|
@@ -2640,57 +2626,73 @@ $c_Lio_kaitai_struct_TypeProcessor$.prototype.getOpaqueClasses__Lio_kaitai_struc
|
|
|
2640
2626
|
throw new $c_s_MatchError(x0$1)
|
|
2641
2627
|
}
|
|
2642
2628
|
}));
|
|
2643
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
2644
|
-
var this$
|
|
2645
|
-
var f$
|
|
2629
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f);
|
|
2630
|
+
var this$8 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
2631
|
+
var f$1 = new $c_sjsr_AnonFunction1(((x0$2$2) => {
|
|
2646
2632
|
var x0$2 = $as_T2(x0$2$2);
|
|
2647
2633
|
if ((x0$2 !== null)) {
|
|
2648
2634
|
var nestedType = $as_Lio_kaitai_struct_format_ClassSpec($n(x0$2).T2__f__2);
|
|
2649
|
-
var this$
|
|
2650
|
-
var xs$
|
|
2651
|
-
return this$
|
|
2635
|
+
var this$7 = $n(res);
|
|
2636
|
+
var xs$3 = $m_Lio_kaitai_struct_TypeProcessor$().getExternalTypes__Lio_kaitai_struct_format_ClassSpec__sc_Iterable(nestedType);
|
|
2637
|
+
return this$7.addAll__sc_IterableOnce__scm_HashSet(xs$3)
|
|
2652
2638
|
} else {
|
|
2653
2639
|
throw new $c_s_MatchError(x0$2)
|
|
2654
2640
|
}
|
|
2655
2641
|
}));
|
|
2656
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
2642
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$8.sci_TreeMap__f_tree, f$1);
|
|
2657
2643
|
return res
|
|
2658
2644
|
});
|
|
2659
|
-
$c_Lio_kaitai_struct_TypeProcessor$.prototype.
|
|
2660
|
-
|
|
2661
|
-
var
|
|
2662
|
-
if ($
|
|
2663
|
-
$
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2645
|
+
$c_Lio_kaitai_struct_TypeProcessor$.prototype.getExternalTypesFromDataType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ClassSpec__sc_Iterable = (function(dataType, curClass) {
|
|
2646
|
+
while (true) {
|
|
2647
|
+
var x1 = dataType;
|
|
2648
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
2649
|
+
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(x1);
|
|
2650
|
+
if ($n(x2).isExternal__Lio_kaitai_struct_format_ClassSpec__Z(curClass)) {
|
|
2651
|
+
$n($m_s_package$().s_package$__f_List);
|
|
2652
|
+
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()))];
|
|
2653
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
2654
|
+
return $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems)
|
|
2655
|
+
} else {
|
|
2656
|
+
return $m_sci_Nil$()
|
|
2657
|
+
}
|
|
2658
|
+
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
2659
|
+
var x3 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(x1);
|
|
2660
|
+
if ($n(x3).isExternal__Lio_kaitai_struct_format_ClassSpec__Z(curClass)) {
|
|
2661
|
+
$n($m_s_package$().s_package$__f_List);
|
|
2662
|
+
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()))];
|
|
2663
|
+
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
2664
|
+
return $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1)
|
|
2665
|
+
} else {
|
|
2666
|
+
return $m_sci_Nil$()
|
|
2667
|
+
}
|
|
2668
|
+
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
2669
|
+
var x4 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
2670
|
+
var this$9 = $n($n(x4).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
2671
|
+
var b = $m_sci_Iterable$().newBuilder__scm_Builder();
|
|
2672
|
+
$m_sci_RedBlackTree$();
|
|
2673
|
+
var tree = this$9.sci_TreeMap__f_tree;
|
|
2674
|
+
$m_sci_RedBlackTree$();
|
|
2675
|
+
var start = $m_s_None$();
|
|
2676
|
+
var evidence$16 = this$9.sci_TreeMap__f_ordering;
|
|
2677
|
+
var it = new $c_sci_RedBlackTree$EntriesIterator(tree, start, evidence$16);
|
|
2678
|
+
while (it.hasNext__Z()) {
|
|
2679
|
+
var this$12 = $n(b);
|
|
2680
|
+
var arg1 = it.next__O();
|
|
2681
|
+
var x0$1 = $as_T2(arg1);
|
|
2682
|
+
if ((x0$1 === null)) {
|
|
2683
|
+
throw new $c_s_MatchError(x0$1)
|
|
2684
|
+
};
|
|
2685
|
+
var ut = $as_Lio_kaitai_struct_datatype_DataType($n(x0$1).T2__f__2);
|
|
2686
|
+
var xs = $m_Lio_kaitai_struct_TypeProcessor$().getExternalTypesFromDataType__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ClassSpec__sc_Iterable(ut, curClass);
|
|
2687
|
+
this$12.addAll__sc_IterableOnce__scm_Growable(xs)
|
|
2688
|
+
};
|
|
2689
|
+
return $as_sc_Iterable($n(b).result__O())
|
|
2690
|
+
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
2691
|
+
var x5 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
2692
|
+
dataType = $n(x5).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType
|
|
2667
2693
|
} else {
|
|
2668
2694
|
return $m_sci_Nil$()
|
|
2669
2695
|
}
|
|
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
2696
|
}
|
|
2695
2697
|
});
|
|
2696
2698
|
var $d_Lio_kaitai_struct_TypeProcessor$ = new $TypeData().initClass({
|
|
@@ -3010,8 +3012,8 @@ function $m_Lio_kaitai_struct_Utils$() {
|
|
|
3010
3012
|
function $c_Lio_kaitai_struct_Version$() {
|
|
3011
3013
|
this.Lio_kaitai_struct_Version$__f_version = null;
|
|
3012
3014
|
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-
|
|
3015
|
+
this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20240610.172038.27d5020";
|
|
3016
|
+
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-06-10T17:20:38Z"
|
|
3015
3017
|
}
|
|
3016
3018
|
$c_Lio_kaitai_struct_Version$.prototype = new $h_O();
|
|
3017
3019
|
$c_Lio_kaitai_struct_Version$.prototype.constructor = $c_Lio_kaitai_struct_Version$;
|
|
@@ -19173,10 +19175,9 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19173
19175
|
var x3 = null;
|
|
19174
19176
|
var x1$2 = $n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_forcedParent;
|
|
19175
19177
|
matchEnd9: {
|
|
19176
|
-
var this$1;
|
|
19177
19178
|
var x = $m_s_None$();
|
|
19178
19179
|
if ((x === x1$2)) {
|
|
19179
|
-
|
|
19180
|
+
$thiz.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V(curClass, x2);
|
|
19180
19181
|
break matchEnd9
|
|
19181
19182
|
};
|
|
19182
19183
|
if ((x1$2 instanceof $c_s_Some)) {
|
|
@@ -19186,7 +19187,6 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19186
19187
|
var x$3 = $m_Lio_kaitai_struct_datatype_DataType$().Lio_kaitai_struct_datatype_DataType$__f_USER_TYPE_NO_PARENT;
|
|
19187
19188
|
if (((x$3 === null) ? (p4 === null) : $n(x$3).equals__O__Z(p4))) {
|
|
19188
19189
|
$n($m_Lio_kaitai_struct_Log$().Lio_kaitai_struct_Log$__f_typeProcParent);
|
|
19189
|
-
var this$1 = $m_s_None$();
|
|
19190
19190
|
break matchEnd9
|
|
19191
19191
|
}
|
|
19192
19192
|
};
|
|
@@ -19196,23 +19196,19 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19196
19196
|
var detector = $ct_Lio_kaitai_struct_translators_TypeDetector__Lio_kaitai_struct_translators_TypeProvider__(new $c_Lio_kaitai_struct_translators_TypeDetector(), provider);
|
|
19197
19197
|
var parentType = detector.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(parent);
|
|
19198
19198
|
$n($m_Lio_kaitai_struct_Log$().Lio_kaitai_struct_Log$__f_typeProcParent);
|
|
19199
|
-
if ((
|
|
19199
|
+
if ((parentType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
19200
|
+
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(parentType);
|
|
19201
|
+
$thiz.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V($as_Lio_kaitai_struct_format_ClassSpec($n($n(x2$2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O()), x2)
|
|
19202
|
+
} else {
|
|
19200
19203
|
throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError((((("parent=" + parent) + " is expected to be either of user type or `false`, but ") + parentType) + " found"))
|
|
19201
19204
|
};
|
|
19202
|
-
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(parentType);
|
|
19203
|
-
var this$1 = new $c_s_Some($n($n(x2$2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O());
|
|
19204
19205
|
break matchEnd9
|
|
19205
19206
|
};
|
|
19206
19207
|
throw new $c_s_MatchError(x1$2)
|
|
19207
|
-
};
|
|
19208
|
-
if ((!this$1.isEmpty__Z())) {
|
|
19209
|
-
var arg1 = this$1.get__O();
|
|
19210
|
-
var parentClass = $as_Lio_kaitai_struct_format_ClassSpec(arg1);
|
|
19211
|
-
$thiz.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V(parentClass, x2)
|
|
19212
19208
|
}
|
|
19213
19209
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
19214
19210
|
var x3$2 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
19215
|
-
var this$
|
|
19211
|
+
var this$1 = $n($n(x3$2).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
19216
19212
|
var f = new $c_sjsr_AnonFunction1(((curClass) => ((x0$1$2) => {
|
|
19217
19213
|
var x0$1 = $as_T2(x0$1$2);
|
|
19218
19214
|
matchEnd7: {
|
|
@@ -19230,11 +19226,11 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19230
19226
|
throw new $c_s_MatchError(x0$1)
|
|
19231
19227
|
}
|
|
19232
19228
|
}))(curClass));
|
|
19233
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
19229
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$1.sci_TreeMap__f_tree, f)
|
|
19234
19230
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream)) {
|
|
19235
19231
|
var x4 = $as_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(x1);
|
|
19236
|
-
var this$
|
|
19237
|
-
var innerType = this$
|
|
19232
|
+
var this$2 = $n(x4);
|
|
19233
|
+
var innerType = this$2.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
19238
19234
|
dt = innerType;
|
|
19239
19235
|
continue
|
|
19240
19236
|
};
|
|
@@ -19275,6 +19271,38 @@ $c_Lio_kaitai_struct_precompile_ParentTypes.prototype.run__V = (function() {
|
|
|
19275
19271
|
}
|
|
19276
19272
|
};
|
|
19277
19273
|
i = ((1 + i) | 0)
|
|
19274
|
+
};
|
|
19275
|
+
var this$3 = $n(this.Lio_kaitai_struct_precompile_ParentTypes__f_classSpecs);
|
|
19276
|
+
var len$1 = $n(this$3.scm_HashMap__f_scala$collection$mutable$HashMap$$table).u.length;
|
|
19277
|
+
var i$1 = 0;
|
|
19278
|
+
while ((i$1 < len$1)) {
|
|
19279
|
+
var n$1 = $n(this$3.scm_HashMap__f_scala$collection$mutable$HashMap$$table).get(i$1);
|
|
19280
|
+
if ((n$1 !== null)) {
|
|
19281
|
+
var this$4 = $n(n$1);
|
|
19282
|
+
var _$this$1 = this$4;
|
|
19283
|
+
while (true) {
|
|
19284
|
+
var _1$1 = $n(_$this$1).scm_HashMap$Node__f__key;
|
|
19285
|
+
var _2$1 = $n(_$this$1).scm_HashMap$Node__f__value;
|
|
19286
|
+
$as_T(_1$1);
|
|
19287
|
+
var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(_2$1);
|
|
19288
|
+
try {
|
|
19289
|
+
$n(typeSpec).Lio_kaitai_struct_format_ClassSpec__f_parentClass = $m_Lio_kaitai_struct_format_GenericStructClassSpec$()
|
|
19290
|
+
} catch (e) {
|
|
19291
|
+
if ((e instanceof $c_Lio_kaitai_struct_problems_CompilationProblemException)) {
|
|
19292
|
+
var cpe = $as_Lio_kaitai_struct_problems_CompilationProblemException(e);
|
|
19293
|
+
throw $n($n(cpe).localizedInType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_problems_CompilationProblemException(typeSpec))
|
|
19294
|
+
} else {
|
|
19295
|
+
throw e
|
|
19296
|
+
}
|
|
19297
|
+
};
|
|
19298
|
+
if (($n(_$this$1).scm_HashMap$Node__f__next !== null)) {
|
|
19299
|
+
_$this$1 = $n(_$this$1).scm_HashMap$Node__f__next;
|
|
19300
|
+
continue
|
|
19301
|
+
};
|
|
19302
|
+
break
|
|
19303
|
+
}
|
|
19304
|
+
};
|
|
19305
|
+
i$1 = ((1 + i$1) | 0)
|
|
19278
19306
|
}
|
|
19279
19307
|
});
|
|
19280
19308
|
$c_Lio_kaitai_struct_precompile_ParentTypes.prototype.markup__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
@@ -19311,7 +19339,26 @@ $c_Lio_kaitai_struct_precompile_ParentTypes.prototype.markup__Lio_kaitai_struct_
|
|
|
19311
19339
|
throw new $c_s_MatchError(x0$1)
|
|
19312
19340
|
}
|
|
19313
19341
|
}));
|
|
19314
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f)
|
|
19342
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f);
|
|
19343
|
+
var this$7 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
19344
|
+
if ((!this$7.isEmpty__Z())) {
|
|
19345
|
+
$n($m_Lio_kaitai_struct_Log$().Lio_kaitai_struct_Log$__f_typeProcParent)
|
|
19346
|
+
};
|
|
19347
|
+
var this$8 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
19348
|
+
var f$1 = new $c_sjsr_AnonFunction1(((x0$2$2) => {
|
|
19349
|
+
var x0$2 = $as_T2(x0$2$2);
|
|
19350
|
+
if ((x0$2 !== null)) {
|
|
19351
|
+
var ty = $as_Lio_kaitai_struct_format_ClassSpec($n(x0$2).T2__f__2);
|
|
19352
|
+
var x = $n(ty).Lio_kaitai_struct_format_ClassSpec__f_parentClass;
|
|
19353
|
+
var x$2 = $m_Lio_kaitai_struct_format_UnknownClassSpec$();
|
|
19354
|
+
if (((x !== null) && $n(x).equals__O__Z(x$2))) {
|
|
19355
|
+
this.markup__Lio_kaitai_struct_format_ClassSpec__V(ty)
|
|
19356
|
+
}
|
|
19357
|
+
} else {
|
|
19358
|
+
throw new $c_s_MatchError(x0$2)
|
|
19359
|
+
}
|
|
19360
|
+
}));
|
|
19361
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$8.sci_TreeMap__f_tree, f$1)
|
|
19315
19362
|
});
|
|
19316
19363
|
$c_Lio_kaitai_struct_precompile_ParentTypes.prototype.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V = (function(curClass, ut) {
|
|
19317
19364
|
var x1 = $n(ut).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec;
|
|
@@ -20324,10 +20371,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20324
20371
|
var x11 = $as_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel(v);
|
|
20325
20372
|
var enumType = $n(x11).Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel__f_enumName;
|
|
20326
20373
|
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$());
|
|
20374
|
+
var this$7 = $n($n($n(inType).Lio_kaitai_struct_exprlang_Ast$typeId__f_names).toList__sci_List());
|
|
20375
|
+
var elem = $n(enumType).Lio_kaitai_struct_exprlang_Ast$identifier__f_name;
|
|
20376
|
+
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
20377
|
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
20378
|
return t
|
|
20333
20379
|
};
|
|
@@ -20336,9 +20382,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20336
20382
|
var enumType$2 = $n(x13).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_enumName;
|
|
20337
20383
|
var inType$2 = $n(x13).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_inType;
|
|
20338
20384
|
$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
|
|
20385
|
+
var array = [$n(enumType$2).Lio_kaitai_struct_exprlang_Ast$identifier__f_name];
|
|
20386
|
+
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
20387
|
+
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
20388
|
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
20389
|
return t$2
|
|
20344
20390
|
};
|
|
@@ -20346,9 +20392,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20346
20392
|
var x15 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Name(v);
|
|
20347
20393
|
var name = $n(x15).Lio_kaitai_struct_exprlang_Ast$expr$Name__f_id;
|
|
20348
20394
|
if ((name !== null)) {
|
|
20349
|
-
var this$
|
|
20395
|
+
var this$12 = $n(this.Lio_kaitai_struct_translators_TypeDetector__f_provider);
|
|
20350
20396
|
var attrName = $n(name).Lio_kaitai_struct_exprlang_Ast$identifier__f_name;
|
|
20351
|
-
var qual$1 = this$
|
|
20397
|
+
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
20398
|
var x$1 = $n(qual$1).asNonOwning$default$1__Z();
|
|
20353
20399
|
return $n(qual$1).asNonOwning__Z__Lio_kaitai_struct_datatype_DataType(x$1)
|
|
20354
20400
|
}
|
|
@@ -20356,8 +20402,8 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20356
20402
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName)) {
|
|
20357
20403
|
var x17 = $as_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(v);
|
|
20358
20404
|
var id = $n(x17).Lio_kaitai_struct_exprlang_Ast$expr$InternalName__f_id;
|
|
20359
|
-
var this$
|
|
20360
|
-
return this$
|
|
20405
|
+
var this$13 = $n(this.Lio_kaitai_struct_translators_TypeDetector__f_provider);
|
|
20406
|
+
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
20407
|
};
|
|
20362
20408
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
|
|
20363
20409
|
var x18 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(v);
|
|
@@ -20513,8 +20559,8 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20513
20559
|
var x1$5 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(container);
|
|
20514
20560
|
if ((x1$5 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream)) {
|
|
20515
20561
|
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(x1$5);
|
|
20516
|
-
var this$
|
|
20517
|
-
var elType = this$
|
|
20562
|
+
var this$15 = $n(x2$2);
|
|
20563
|
+
var elType = this$15.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
20518
20564
|
if ((elType !== null)) {
|
|
20519
20565
|
var x1$6 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(idx);
|
|
20520
20566
|
if ((x1$6 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -20533,8 +20579,8 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
20533
20579
|
};
|
|
20534
20580
|
if ((x1$5 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcArrayType)) {
|
|
20535
20581
|
var x4$2 = $as_Lio_kaitai_struct_datatype_DataType$CalcArrayType(x1$5);
|
|
20536
|
-
var this$
|
|
20537
|
-
var elType$2 = this$
|
|
20582
|
+
var this$16 = $n(x4$2);
|
|
20583
|
+
var elType$2 = this$16.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
20538
20584
|
if ((elType$2 !== null)) {
|
|
20539
20585
|
var x1$8 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(idx);
|
|
20540
20586
|
if ((x1$8 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -33672,7 +33718,7 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.topClass__Lio_kaitai_struct_format_
|
|
|
33672
33718
|
});
|
|
33673
33719
|
$c_Lio_kaitai_struct_ClassCompiler.prototype.compile__Lio_kaitai_struct_CompileLog$SpecSuccess = (function() {
|
|
33674
33720
|
$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.
|
|
33721
|
+
this.compileExternalTypes__Lio_kaitai_struct_format_ClassSpec__V(this.topClass__Lio_kaitai_struct_format_ClassSpec());
|
|
33676
33722
|
this.compileClass__Lio_kaitai_struct_format_ClassSpec__V(this.topClass__Lio_kaitai_struct_format_ClassSpec());
|
|
33677
33723
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).fileFooter__T__V($as_T($n(this.Lio_kaitai_struct_ClassCompiler__f_topClassName).head__O()));
|
|
33678
33724
|
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 +33732,14 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compile__Lio_kaitai_struct_CompileL
|
|
|
33686
33732
|
}
|
|
33687
33733
|
}))))).toList__sci_List())
|
|
33688
33734
|
});
|
|
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
|
-
}
|
|
33735
|
+
$c_Lio_kaitai_struct_ClassCompiler.prototype.compileExternalTypes__Lio_kaitai_struct_format_ClassSpec__V = (function(topClass) {
|
|
33736
|
+
$n($m_Lio_kaitai_struct_TypeProcessor$().getExternalTypes__Lio_kaitai_struct_format_ClassSpec__sc_Iterable(topClass)).foreach__F1__V(new $c_sjsr_AnonFunction1(((extType$2) => {
|
|
33737
|
+
var extType = $as_Lio_kaitai_struct_ExternalType(extType$2);
|
|
33738
|
+
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V(extType)
|
|
33695
33739
|
})))
|
|
33696
33740
|
});
|
|
33697
33741
|
$c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
33698
33742
|
$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
33743
|
if ((!$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).innerDocstrings__Z())) {
|
|
33708
33744
|
this.compileClassDoc__Lio_kaitai_struct_format_ClassSpec__V(curClass)
|
|
33709
33745
|
};
|
|
@@ -33711,7 +33747,7 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_for
|
|
|
33711
33747
|
if ($n(this.Lio_kaitai_struct_ClassCompiler__f_lang).innerDocstrings__Z()) {
|
|
33712
33748
|
this.compileClassDoc__Lio_kaitai_struct_format_ClassSpec__V(curClass)
|
|
33713
33749
|
};
|
|
33714
|
-
var this$
|
|
33750
|
+
var this$6 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
33715
33751
|
var f = new $c_sjsr_AnonFunction1(((x0$1$2) => {
|
|
33716
33752
|
var x0$1 = $as_T2(x0$1$2);
|
|
33717
33753
|
if ((x0$1 !== null)) {
|
|
@@ -33725,22 +33761,7 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_for
|
|
|
33725
33761
|
throw new $c_s_MatchError(x0$1)
|
|
33726
33762
|
}
|
|
33727
33763
|
}));
|
|
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
|
-
};
|
|
33764
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f);
|
|
33744
33765
|
if ($n(this.Lio_kaitai_struct_ClassCompiler__f_lang).innerEnums__Z()) {
|
|
33745
33766
|
this.compileEnums__Lio_kaitai_struct_format_ClassSpec__V(curClass)
|
|
33746
33767
|
};
|
|
@@ -33755,26 +33776,26 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileClass__Lio_kaitai_struct_for
|
|
|
33755
33776
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass = curClass
|
|
33756
33777
|
};
|
|
33757
33778
|
this.compileInstances__Lio_kaitai_struct_format_ClassSpec__V(curClass);
|
|
33758
|
-
var this$
|
|
33779
|
+
var this$7 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_seq);
|
|
33759
33780
|
var suffix = $n(curClass).Lio_kaitai_struct_format_ClassSpec__f_params;
|
|
33760
|
-
var this$
|
|
33781
|
+
var this$20 = $n(this$7.appendedAll__sc_IterableOnce__sci_List(suffix));
|
|
33761
33782
|
$n($m_s_package$().s_package$__f_List);
|
|
33762
33783
|
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
33784
|
var $$x3 = $m_sci_Nil$();
|
|
33764
33785
|
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$
|
|
33786
|
+
var this$12 = $n(curClass);
|
|
33787
|
+
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
33788
|
var elems$1 = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array$1);
|
|
33768
33789
|
var suffix$1 = $m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems$1);
|
|
33769
|
-
var this$
|
|
33790
|
+
var this$21 = $n(this$20.appendedAll__sc_IterableOnce__sci_List(suffix$1));
|
|
33770
33791
|
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$
|
|
33792
|
+
var allAttrs = this$21.appendedAll__sc_IterableOnce__sci_List(suffix$2);
|
|
33772
33793
|
this.compileAttrDeclarations__sci_List__V(allAttrs);
|
|
33773
33794
|
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
|
|
33795
|
+
var this$22 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_toStringExpr);
|
|
33796
|
+
if ((!this$22.isEmpty__Z())) {
|
|
33797
|
+
var arg1 = this$22.get__O();
|
|
33798
|
+
var expr = $as_Lio_kaitai_struct_exprlang_Ast$expr(arg1);
|
|
33778
33799
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).classToString__Lio_kaitai_struct_exprlang_Ast$expr__V(expr)
|
|
33779
33800
|
};
|
|
33780
33801
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).classFooter__sci_List__V($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
@@ -43551,8 +43572,7 @@ $c_Lio_kaitai_struct_NimClassCompiler.prototype.compile__Lio_kaitai_struct_Compi
|
|
|
43551
43572
|
var $$x1 = $n(this.Lio_kaitai_struct_ClassCompiler__f_lang);
|
|
43552
43573
|
var theClass = this.Lio_kaitai_struct_ClassCompiler__f_topClass;
|
|
43553
43574
|
$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);
|
|
43575
|
+
this.compileExternalTypes__Lio_kaitai_struct_format_ClassSpec__V(this.Lio_kaitai_struct_ClassCompiler__f_topClass);
|
|
43556
43576
|
$n(this.Lio_kaitai_struct_NimClassCompiler__f_nimlang).typeSectionHeader__V();
|
|
43557
43577
|
this.compileTypes__Lio_kaitai_struct_format_ClassSpec__V(this.Lio_kaitai_struct_ClassCompiler__f_topClass);
|
|
43558
43578
|
$n(this.Lio_kaitai_struct_NimClassCompiler__f_nimlang).typeSectionFooter__V();
|
|
@@ -43688,31 +43708,6 @@ $c_Lio_kaitai_struct_NimClassCompiler.prototype.compileInstance__sci_List__Lio_k
|
|
|
43688
43708
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
|
|
43689
43709
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_lang).instanceFooter__V()
|
|
43690
43710
|
});
|
|
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
43711
|
$c_Lio_kaitai_struct_NimClassCompiler.prototype.compileTypes__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
43717
43712
|
$n(this.Lio_kaitai_struct_ClassCompiler__f_provider).Lio_kaitai_struct_ClassTypeProvider__f_nowClass = curClass;
|
|
43718
43713
|
$n(this.Lio_kaitai_struct_NimClassCompiler__f_nimlang).classHeader__sci_List__V($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
@@ -44186,6 +44181,12 @@ $h_Lio_kaitai_struct_languages_CppCompiler$.prototype = $c_Lio_kaitai_struct_lan
|
|
|
44186
44181
|
$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
44182
|
return new $c_Lio_kaitai_struct_languages_CppCompiler(tp, config)
|
|
44188
44183
|
});
|
|
44184
|
+
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.outFileNameSource__T__T = (function(className) {
|
|
44185
|
+
return (className + ".cpp")
|
|
44186
|
+
});
|
|
44187
|
+
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.outFileNameHeader__T__T = (function(className) {
|
|
44188
|
+
return (className + ".h")
|
|
44189
|
+
});
|
|
44189
44190
|
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
44190
44191
|
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
44191
44192
|
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
@@ -44218,17 +44219,17 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.idToStr__Lio_kaitai_struct
|
|
|
44218
44219
|
throw new $c_s_MatchError(id)
|
|
44219
44220
|
}
|
|
44220
44221
|
});
|
|
44221
|
-
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.
|
|
44222
|
+
$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
44223
|
while (true) {
|
|
44223
|
-
var
|
|
44224
|
+
var rc70 = false;
|
|
44224
44225
|
var x2 = null;
|
|
44225
|
-
var
|
|
44226
|
+
var rc71 = false;
|
|
44226
44227
|
var x5 = null;
|
|
44227
|
-
var
|
|
44228
|
+
var rc72 = false;
|
|
44228
44229
|
var x44 = null;
|
|
44229
44230
|
var x1 = attrType;
|
|
44230
44231
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$Int1Type)) {
|
|
44231
|
-
|
|
44232
|
+
rc70 = true;
|
|
44232
44233
|
x2 = $as_Lio_kaitai_struct_datatype_DataType$Int1Type(x1);
|
|
44233
44234
|
var p3 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
44234
44235
|
if ((p3 === false)) {
|
|
@@ -44236,7 +44237,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44236
44237
|
}
|
|
44237
44238
|
};
|
|
44238
44239
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntMultiType)) {
|
|
44239
|
-
|
|
44240
|
+
rc71 = true;
|
|
44240
44241
|
x5 = $as_Lio_kaitai_struct_datatype_DataType$IntMultiType(x1);
|
|
44241
44242
|
var p6 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44242
44243
|
var p7 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
@@ -44250,7 +44251,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44250
44251
|
return "uint16_t"
|
|
44251
44252
|
}
|
|
44252
44253
|
};
|
|
44253
|
-
if (
|
|
44254
|
+
if (rc71) {
|
|
44254
44255
|
var p12 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44255
44256
|
var p13 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44256
44257
|
if ((p12 === false)) {
|
|
@@ -44263,7 +44264,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44263
44264
|
return "uint32_t"
|
|
44264
44265
|
}
|
|
44265
44266
|
};
|
|
44266
|
-
if (
|
|
44267
|
+
if (rc71) {
|
|
44267
44268
|
var p18 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44268
44269
|
var p19 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44269
44270
|
if ((p18 === false)) {
|
|
@@ -44276,13 +44277,13 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44276
44277
|
return "uint64_t"
|
|
44277
44278
|
}
|
|
44278
44279
|
};
|
|
44279
|
-
if (
|
|
44280
|
+
if (rc70) {
|
|
44280
44281
|
var p24 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
44281
44282
|
if ((p24 === true)) {
|
|
44282
44283
|
return "int8_t"
|
|
44283
44284
|
}
|
|
44284
44285
|
};
|
|
44285
|
-
if (
|
|
44286
|
+
if (rc71) {
|
|
44286
44287
|
var p27 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44287
44288
|
var p28 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44288
44289
|
if ((p27 === true)) {
|
|
@@ -44295,7 +44296,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44295
44296
|
return "int16_t"
|
|
44296
44297
|
}
|
|
44297
44298
|
};
|
|
44298
|
-
if (
|
|
44299
|
+
if (rc71) {
|
|
44299
44300
|
var p33 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44300
44301
|
var p34 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44301
44302
|
if ((p33 === true)) {
|
|
@@ -44308,7 +44309,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44308
44309
|
return "int32_t"
|
|
44309
44310
|
}
|
|
44310
44311
|
};
|
|
44311
|
-
if (
|
|
44312
|
+
if (rc71) {
|
|
44312
44313
|
var p39 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
44313
44314
|
var p40 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
44314
44315
|
if ((p39 === true)) {
|
|
@@ -44322,7 +44323,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44322
44323
|
}
|
|
44323
44324
|
};
|
|
44324
44325
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$FloatMultiType)) {
|
|
44325
|
-
|
|
44326
|
+
rc72 = true;
|
|
44326
44327
|
x44 = $as_Lio_kaitai_struct_datatype_DataType$FloatMultiType(x1);
|
|
44327
44328
|
var p45 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
44328
44329
|
var x$13 = $m_Lio_kaitai_struct_datatype_DataType$Width4$();
|
|
@@ -44330,7 +44331,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44330
44331
|
return "float"
|
|
44331
44332
|
}
|
|
44332
44333
|
};
|
|
44333
|
-
if (
|
|
44334
|
+
if (rc72) {
|
|
44334
44335
|
var p49 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
44335
44336
|
var x$15 = $m_Lio_kaitai_struct_datatype_DataType$Width8$();
|
|
44336
44337
|
if ((x$15 === p49)) {
|
|
@@ -44377,57 +44378,51 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44377
44378
|
var x61 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(x1);
|
|
44378
44379
|
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))
|
|
44379
44380
|
};
|
|
44380
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$
|
|
44381
|
-
var x62 = $as_Lio_kaitai_struct_datatype_DataType$
|
|
44382
|
-
|
|
44383
|
-
var
|
|
44384
|
-
var
|
|
44385
|
-
|
|
44386
|
-
|
|
44387
|
-
|
|
44388
|
-
} else {
|
|
44389
|
-
var
|
|
44390
|
-
|
|
44391
|
-
|
|
44392
|
-
|
|
44393
|
-
|
|
44394
|
-
|
|
44381
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
44382
|
+
var x62 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
44383
|
+
$n(importListHdr).addSystem__T__V("vector");
|
|
44384
|
+
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)) + ">");
|
|
44385
|
+
var _2 = $n(config).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
44386
|
+
if ((x62 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream)) {
|
|
44387
|
+
var x$25 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44388
|
+
var $$x7 = (x$25 === _2)
|
|
44389
|
+
} else {
|
|
44390
|
+
var $$x7 = false
|
|
44391
|
+
};
|
|
44392
|
+
if ($$x7) {
|
|
44393
|
+
return (("std::unique_ptr<" + vecType) + ">")
|
|
44394
|
+
} else {
|
|
44395
|
+
return (vecType + "*")
|
|
44395
44396
|
}
|
|
44396
44397
|
};
|
|
44397
|
-
|
|
44398
|
-
|
|
44399
|
-
var this$2 = $n(x63);
|
|
44400
|
-
var inType$2 = this$2.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
44401
|
-
return (("std::vector<" + this.kaitaiType2NativeType__Lio_kaitai_struct_CppRuntimeConfig__Lio_kaitai_struct_datatype_DataType__Z__T(config, inType$2, absolute)) + ">*")
|
|
44402
|
-
};
|
|
44403
|
-
var x$29 = $m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$();
|
|
44404
|
-
if ((x$29 === x1)) {
|
|
44398
|
+
var x$27 = $m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$();
|
|
44399
|
+
if ((x$27 === x1)) {
|
|
44405
44400
|
var x1$4 = $n(config).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
44406
|
-
var x$
|
|
44407
|
-
if ((x$
|
|
44401
|
+
var x$29 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
44402
|
+
if ((x$29 === x1$4)) {
|
|
44408
44403
|
return "kaitai::kstream*"
|
|
44409
44404
|
} else {
|
|
44410
|
-
var x$
|
|
44411
|
-
if ((x$
|
|
44405
|
+
var x$31 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44406
|
+
if ((x$31 === x1$4)) {
|
|
44412
44407
|
return "std::unique_ptr<kaitai::kstream>"
|
|
44413
44408
|
} else {
|
|
44414
44409
|
throw new $c_s_MatchError(x1$4)
|
|
44415
44410
|
}
|
|
44416
44411
|
}
|
|
44417
44412
|
};
|
|
44418
|
-
var x$
|
|
44419
|
-
if ((x$
|
|
44413
|
+
var x$33 = $m_Lio_kaitai_struct_datatype_DataType$KaitaiStreamType$();
|
|
44414
|
+
if ((x$33 === x1)) {
|
|
44420
44415
|
return "kaitai::kstream*"
|
|
44421
44416
|
};
|
|
44422
|
-
var x$
|
|
44423
|
-
if ((x$
|
|
44417
|
+
var x$35 = $m_Lio_kaitai_struct_datatype_DataType$KaitaiStructType$();
|
|
44418
|
+
if ((x$35 === x1)) {
|
|
44424
44419
|
var x1$5 = $n(config).Lio_kaitai_struct_CppRuntimeConfig__f_pointers;
|
|
44425
|
-
var x$
|
|
44426
|
-
if ((x$
|
|
44420
|
+
var x$37 = $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$();
|
|
44421
|
+
if ((x$37 === x1$5)) {
|
|
44427
44422
|
return "kaitai::kstruct*"
|
|
44428
44423
|
} else {
|
|
44429
|
-
var x$
|
|
44430
|
-
if ((x$
|
|
44424
|
+
var x$39 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
44425
|
+
if ((x$39 === x1$5)) {
|
|
44431
44426
|
return "std::unique_ptr<kaitai::kstruct>"
|
|
44432
44427
|
} else {
|
|
44433
44428
|
throw new $c_s_MatchError(x1$5)
|
|
@@ -44438,8 +44433,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.kaitaiType2NativeType__Lio
|
|
|
44438
44433
|
return "kaitai::kstruct*"
|
|
44439
44434
|
};
|
|
44440
44435
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
44441
|
-
var
|
|
44442
|
-
attrType = this.combineSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__Lio_kaitai_struct_datatype_DataType(
|
|
44436
|
+
var x68 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
44437
|
+
attrType = this.combineSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__Lio_kaitai_struct_datatype_DataType(x68);
|
|
44443
44438
|
continue
|
|
44444
44439
|
};
|
|
44445
44440
|
throw new $c_s_MatchError(x1)
|
|
@@ -49636,7 +49631,7 @@ $c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.isExternal__Lio_kaitai
|
|
|
49636
49631
|
});
|
|
49637
49632
|
$c_Lio_kaitai_struct_datatype_DataType$UserType.prototype.isOpaque__Z = (function() {
|
|
49638
49633
|
var cs = $as_Lio_kaitai_struct_format_ClassSpec($n(this.Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O());
|
|
49639
|
-
return
|
|
49634
|
+
return $n($n(cs).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_isOpaque
|
|
49640
49635
|
});
|
|
49641
49636
|
function $as_Lio_kaitai_struct_datatype_DataType$UserType(obj) {
|
|
49642
49637
|
return (((obj instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.datatype.DataType$UserType"))
|
|
@@ -50497,20 +50492,20 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.idToStr__Lio_kaitai_struc
|
|
|
50497
50492
|
throw new $c_s_MatchError(id)
|
|
50498
50493
|
}
|
|
50499
50494
|
});
|
|
50500
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.
|
|
50501
|
-
return (isNullable ? this.
|
|
50495
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__Lio_kaitai_struct_ImportList__T = (function(attrType, isNullable, importList) {
|
|
50496
|
+
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))
|
|
50502
50497
|
});
|
|
50503
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.
|
|
50498
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T = (function(attrType, importList) {
|
|
50504
50499
|
while (true) {
|
|
50505
|
-
var
|
|
50500
|
+
var rc72 = false;
|
|
50506
50501
|
var x2 = null;
|
|
50507
|
-
var
|
|
50502
|
+
var rc73 = false;
|
|
50508
50503
|
var x5 = null;
|
|
50509
|
-
var
|
|
50504
|
+
var rc74 = false;
|
|
50510
50505
|
var x44 = null;
|
|
50511
50506
|
var x1 = attrType;
|
|
50512
50507
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$Int1Type)) {
|
|
50513
|
-
|
|
50508
|
+
rc72 = true;
|
|
50514
50509
|
x2 = $as_Lio_kaitai_struct_datatype_DataType$Int1Type(x1);
|
|
50515
50510
|
var p3 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50516
50511
|
if ((p3 === false)) {
|
|
@@ -50518,7 +50513,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50518
50513
|
}
|
|
50519
50514
|
};
|
|
50520
50515
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntMultiType)) {
|
|
50521
|
-
|
|
50516
|
+
rc73 = true;
|
|
50522
50517
|
x5 = $as_Lio_kaitai_struct_datatype_DataType$IntMultiType(x1);
|
|
50523
50518
|
var p6 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50524
50519
|
var p7 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
@@ -50532,7 +50527,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50532
50527
|
return "int"
|
|
50533
50528
|
}
|
|
50534
50529
|
};
|
|
50535
|
-
if (
|
|
50530
|
+
if (rc73) {
|
|
50536
50531
|
var p12 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50537
50532
|
var p13 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50538
50533
|
if ((p12 === false)) {
|
|
@@ -50545,7 +50540,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50545
50540
|
return "long"
|
|
50546
50541
|
}
|
|
50547
50542
|
};
|
|
50548
|
-
if (
|
|
50543
|
+
if (rc73) {
|
|
50549
50544
|
var p18 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50550
50545
|
var p19 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50551
50546
|
if ((p18 === false)) {
|
|
@@ -50558,13 +50553,13 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50558
50553
|
return "long"
|
|
50559
50554
|
}
|
|
50560
50555
|
};
|
|
50561
|
-
if (
|
|
50556
|
+
if (rc72) {
|
|
50562
50557
|
var p24 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50563
50558
|
if ((p24 === true)) {
|
|
50564
50559
|
return "byte"
|
|
50565
50560
|
}
|
|
50566
50561
|
};
|
|
50567
|
-
if (
|
|
50562
|
+
if (rc73) {
|
|
50568
50563
|
var p27 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50569
50564
|
var p28 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50570
50565
|
if ((p27 === true)) {
|
|
@@ -50577,7 +50572,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50577
50572
|
return "short"
|
|
50578
50573
|
}
|
|
50579
50574
|
};
|
|
50580
|
-
if (
|
|
50575
|
+
if (rc73) {
|
|
50581
50576
|
var p33 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50582
50577
|
var p34 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50583
50578
|
if ((p33 === true)) {
|
|
@@ -50590,7 +50585,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50590
50585
|
return "int"
|
|
50591
50586
|
}
|
|
50592
50587
|
};
|
|
50593
|
-
if (
|
|
50588
|
+
if (rc73) {
|
|
50594
50589
|
var p39 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50595
50590
|
var p40 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50596
50591
|
if ((p39 === true)) {
|
|
@@ -50604,7 +50599,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50604
50599
|
}
|
|
50605
50600
|
};
|
|
50606
50601
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$FloatMultiType)) {
|
|
50607
|
-
|
|
50602
|
+
rc74 = true;
|
|
50608
50603
|
x44 = $as_Lio_kaitai_struct_datatype_DataType$FloatMultiType(x1);
|
|
50609
50604
|
var p45 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50610
50605
|
var x$13 = $m_Lio_kaitai_struct_datatype_DataType$Width4$();
|
|
@@ -50612,7 +50607,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50612
50607
|
return "float"
|
|
50613
50608
|
}
|
|
50614
50609
|
};
|
|
50615
|
-
if (
|
|
50610
|
+
if (rc74) {
|
|
50616
50611
|
var p49 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50617
50612
|
var x$15 = $m_Lio_kaitai_struct_datatype_DataType$Width8$();
|
|
50618
50613
|
if ((x$15 === p49)) {
|
|
@@ -50666,28 +50661,28 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
50666
50661
|
var name = $n(x67).Lio_kaitai_struct_datatype_DataType$EnumType__f_name;
|
|
50667
50662
|
return this.types2class__sci_List__T(name)
|
|
50668
50663
|
};
|
|
50669
|
-
if ((
|
|
50670
|
-
return this.
|
|
50664
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
50665
|
+
return this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList)
|
|
50671
50666
|
};
|
|
50672
50667
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
50673
|
-
var
|
|
50674
|
-
attrType = $n(
|
|
50668
|
+
var x70 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
50669
|
+
attrType = $n(x70).combinedType__Lio_kaitai_struct_datatype_DataType();
|
|
50675
50670
|
continue
|
|
50676
50671
|
};
|
|
50677
50672
|
throw new $c_s_MatchError(x1)
|
|
50678
50673
|
}
|
|
50679
50674
|
});
|
|
50680
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.
|
|
50675
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T = (function(attrType, importList) {
|
|
50681
50676
|
while (true) {
|
|
50682
|
-
var
|
|
50677
|
+
var rc72 = false;
|
|
50683
50678
|
var x2 = null;
|
|
50684
|
-
var
|
|
50679
|
+
var rc73 = false;
|
|
50685
50680
|
var x5 = null;
|
|
50686
|
-
var
|
|
50681
|
+
var rc74 = false;
|
|
50687
50682
|
var x44 = null;
|
|
50688
50683
|
var x1 = attrType;
|
|
50689
50684
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$Int1Type)) {
|
|
50690
|
-
|
|
50685
|
+
rc72 = true;
|
|
50691
50686
|
x2 = $as_Lio_kaitai_struct_datatype_DataType$Int1Type(x1);
|
|
50692
50687
|
var p3 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50693
50688
|
if ((p3 === false)) {
|
|
@@ -50695,7 +50690,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50695
50690
|
}
|
|
50696
50691
|
};
|
|
50697
50692
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$IntMultiType)) {
|
|
50698
|
-
|
|
50693
|
+
rc73 = true;
|
|
50699
50694
|
x5 = $as_Lio_kaitai_struct_datatype_DataType$IntMultiType(x1);
|
|
50700
50695
|
var p6 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50701
50696
|
var p7 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
@@ -50709,7 +50704,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50709
50704
|
return "Integer"
|
|
50710
50705
|
}
|
|
50711
50706
|
};
|
|
50712
|
-
if (
|
|
50707
|
+
if (rc73) {
|
|
50713
50708
|
var p12 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50714
50709
|
var p13 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50715
50710
|
if ((p12 === false)) {
|
|
@@ -50722,7 +50717,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50722
50717
|
return "Long"
|
|
50723
50718
|
}
|
|
50724
50719
|
};
|
|
50725
|
-
if (
|
|
50720
|
+
if (rc73) {
|
|
50726
50721
|
var p18 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50727
50722
|
var p19 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50728
50723
|
if ((p18 === false)) {
|
|
@@ -50735,13 +50730,13 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50735
50730
|
return "Long"
|
|
50736
50731
|
}
|
|
50737
50732
|
};
|
|
50738
|
-
if (
|
|
50733
|
+
if (rc72) {
|
|
50739
50734
|
var p24 = $n(x2).Lio_kaitai_struct_datatype_DataType$Int1Type__f_signed;
|
|
50740
50735
|
if ((p24 === true)) {
|
|
50741
50736
|
return "Byte"
|
|
50742
50737
|
}
|
|
50743
50738
|
};
|
|
50744
|
-
if (
|
|
50739
|
+
if (rc73) {
|
|
50745
50740
|
var p27 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50746
50741
|
var p28 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50747
50742
|
if ((p27 === true)) {
|
|
@@ -50754,7 +50749,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50754
50749
|
return "Short"
|
|
50755
50750
|
}
|
|
50756
50751
|
};
|
|
50757
|
-
if (
|
|
50752
|
+
if (rc73) {
|
|
50758
50753
|
var p33 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50759
50754
|
var p34 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50760
50755
|
if ((p33 === true)) {
|
|
@@ -50767,7 +50762,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50767
50762
|
return "Integer"
|
|
50768
50763
|
}
|
|
50769
50764
|
};
|
|
50770
|
-
if (
|
|
50765
|
+
if (rc73) {
|
|
50771
50766
|
var p39 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_signed;
|
|
50772
50767
|
var p40 = $n(x5).Lio_kaitai_struct_datatype_DataType$IntMultiType__f_width;
|
|
50773
50768
|
if ((p39 === true)) {
|
|
@@ -50781,7 +50776,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50781
50776
|
}
|
|
50782
50777
|
};
|
|
50783
50778
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$FloatMultiType)) {
|
|
50784
|
-
|
|
50779
|
+
rc74 = true;
|
|
50785
50780
|
x44 = $as_Lio_kaitai_struct_datatype_DataType$FloatMultiType(x1);
|
|
50786
50781
|
var p45 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50787
50782
|
var x$13 = $m_Lio_kaitai_struct_datatype_DataType$Width4$();
|
|
@@ -50789,7 +50784,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50789
50784
|
return "Float"
|
|
50790
50785
|
}
|
|
50791
50786
|
};
|
|
50792
|
-
if (
|
|
50787
|
+
if (rc74) {
|
|
50793
50788
|
var p49 = $n(x44).Lio_kaitai_struct_datatype_DataType$FloatMultiType__f_width;
|
|
50794
50789
|
var x$15 = $m_Lio_kaitai_struct_datatype_DataType$Width8$();
|
|
50795
50790
|
if ((x$15 === p49)) {
|
|
@@ -50843,21 +50838,15 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed_
|
|
|
50843
50838
|
var name = $n(x67).Lio_kaitai_struct_datatype_DataType$EnumType__f_name;
|
|
50844
50839
|
return this.types2class__sci_List__T(name)
|
|
50845
50840
|
};
|
|
50846
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$
|
|
50847
|
-
var x69 = $as_Lio_kaitai_struct_datatype_DataType$
|
|
50848
|
-
var this$1 = $n(
|
|
50849
|
-
|
|
50850
|
-
return (("ArrayList<" + this.
|
|
50851
|
-
};
|
|
50852
|
-
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$CalcArrayType)) {
|
|
50853
|
-
var x70 = $as_Lio_kaitai_struct_datatype_DataType$CalcArrayType(x1);
|
|
50854
|
-
var this$2 = $n(x70);
|
|
50855
|
-
var inType$2 = this$2.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
50856
|
-
return (("ArrayList<" + this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(inType$2)) + ">")
|
|
50841
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
50842
|
+
var x69 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
50843
|
+
var this$1 = $n(importList);
|
|
50844
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "java.util.ArrayList");
|
|
50845
|
+
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)) + ">")
|
|
50857
50846
|
};
|
|
50858
50847
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
50859
|
-
var
|
|
50860
|
-
attrType = $n(
|
|
50848
|
+
var x70 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
50849
|
+
attrType = $n(x70).combinedType__Lio_kaitai_struct_datatype_DataType();
|
|
50861
50850
|
continue
|
|
50862
50851
|
};
|
|
50863
50852
|
throw new $c_s_MatchError(x1)
|
|
@@ -50959,6 +50948,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.ksErrorName__Lio_kaitai_s
|
|
|
50959
50948
|
}
|
|
50960
50949
|
}
|
|
50961
50950
|
});
|
|
50951
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.enumValue__T__T__T = (function(enumName, label) {
|
|
50952
|
+
return (((":" + enumName) + "_") + label)
|
|
50953
|
+
});
|
|
50962
50954
|
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.inverseEnumName__T__T = (function(enumName) {
|
|
50963
50955
|
return ("I__" + enumName)
|
|
50964
50956
|
});
|
|
@@ -51024,7 +51016,7 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrPa
|
|
|
51024
51016
|
$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)
|
|
51025
51017
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
51026
51018
|
var x6 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
51027
|
-
var expr$2 = $n($thiz.translator__Lio_kaitai_struct_translators_BaseTranslator()).
|
|
51019
|
+
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));
|
|
51028
51020
|
$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)
|
|
51029
51021
|
} else {
|
|
51030
51022
|
var expr$3 = $thiz.parseExpr__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__T__s_Option__T(dataType, assignType, io, defEndian);
|
|
@@ -56334,6 +56326,154 @@ function $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$() {
|
|
|
56334
56326
|
return $n_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$
|
|
56335
56327
|
}
|
|
56336
56328
|
/** @constructor */
|
|
56329
|
+
function $c_Lio_kaitai_struct_ExternalEnum(enumSpec) {
|
|
56330
|
+
this.Lio_kaitai_struct_ExternalEnum__f_enumSpec = null;
|
|
56331
|
+
this.Lio_kaitai_struct_ExternalEnum__f_enumSpec = enumSpec
|
|
56332
|
+
}
|
|
56333
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype = new $h_Lio_kaitai_struct_ExternalType();
|
|
56334
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.constructor = $c_Lio_kaitai_struct_ExternalEnum;
|
|
56335
|
+
/** @constructor */
|
|
56336
|
+
function $h_Lio_kaitai_struct_ExternalEnum() {
|
|
56337
|
+
/*<skip>*/
|
|
56338
|
+
}
|
|
56339
|
+
$h_Lio_kaitai_struct_ExternalEnum.prototype = $c_Lio_kaitai_struct_ExternalEnum.prototype;
|
|
56340
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.name__sci_List = (function() {
|
|
56341
|
+
return $n(this.Lio_kaitai_struct_ExternalEnum__f_enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name
|
|
56342
|
+
});
|
|
56343
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.isOpaque__Z = (function() {
|
|
56344
|
+
return false
|
|
56345
|
+
});
|
|
56346
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productPrefix__T = (function() {
|
|
56347
|
+
return "ExternalEnum"
|
|
56348
|
+
});
|
|
56349
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productArity__I = (function() {
|
|
56350
|
+
return 1
|
|
56351
|
+
});
|
|
56352
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productElement__I__O = (function(x$1) {
|
|
56353
|
+
return ((x$1 === 0) ? this.Lio_kaitai_struct_ExternalEnum__f_enumSpec : $m_sr_Statics$().ioobe__I__O(x$1))
|
|
56354
|
+
});
|
|
56355
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.productIterator__sc_Iterator = (function() {
|
|
56356
|
+
return new $c_sr_ScalaRunTime$$anon$1(this)
|
|
56357
|
+
});
|
|
56358
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.hashCode__I = (function() {
|
|
56359
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
56360
|
+
return this$2.productHash__s_Product__I__Z__I(this, (-889275714), false)
|
|
56361
|
+
});
|
|
56362
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.toString__T = (function() {
|
|
56363
|
+
return $m_sr_ScalaRunTime$()._toString__s_Product__T(this)
|
|
56364
|
+
});
|
|
56365
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.equals__O__Z = (function(x$1) {
|
|
56366
|
+
if ((this === x$1)) {
|
|
56367
|
+
return true
|
|
56368
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_ExternalEnum)) {
|
|
56369
|
+
var ExternalEnum$1 = $as_Lio_kaitai_struct_ExternalEnum(x$1);
|
|
56370
|
+
var x = this.Lio_kaitai_struct_ExternalEnum__f_enumSpec;
|
|
56371
|
+
var x$2 = $n(ExternalEnum$1).Lio_kaitai_struct_ExternalEnum__f_enumSpec;
|
|
56372
|
+
if (((x === null) ? (x$2 === null) : $n(x).equals__O__Z(x$2))) {
|
|
56373
|
+
$n(ExternalEnum$1);
|
|
56374
|
+
return true
|
|
56375
|
+
} else {
|
|
56376
|
+
return false
|
|
56377
|
+
}
|
|
56378
|
+
} else {
|
|
56379
|
+
return false
|
|
56380
|
+
}
|
|
56381
|
+
});
|
|
56382
|
+
function $as_Lio_kaitai_struct_ExternalEnum(obj) {
|
|
56383
|
+
return (((obj instanceof $c_Lio_kaitai_struct_ExternalEnum) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.ExternalEnum"))
|
|
56384
|
+
}
|
|
56385
|
+
function $isArrayOf_Lio_kaitai_struct_ExternalEnum(obj, depth) {
|
|
56386
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_ExternalEnum)))
|
|
56387
|
+
}
|
|
56388
|
+
function $asArrayOf_Lio_kaitai_struct_ExternalEnum(obj, depth) {
|
|
56389
|
+
return (($isArrayOf_Lio_kaitai_struct_ExternalEnum(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.ExternalEnum;", depth))
|
|
56390
|
+
}
|
|
56391
|
+
var $d_Lio_kaitai_struct_ExternalEnum = new $TypeData().initClass({
|
|
56392
|
+
Lio_kaitai_struct_ExternalEnum: 0
|
|
56393
|
+
}, false, "io.kaitai.struct.ExternalEnum", {
|
|
56394
|
+
Lio_kaitai_struct_ExternalEnum: 1,
|
|
56395
|
+
Lio_kaitai_struct_ExternalType: 1,
|
|
56396
|
+
O: 1,
|
|
56397
|
+
s_Product: 1,
|
|
56398
|
+
s_Equals: 1,
|
|
56399
|
+
Ljava_io_Serializable: 1
|
|
56400
|
+
});
|
|
56401
|
+
$c_Lio_kaitai_struct_ExternalEnum.prototype.$classData = $d_Lio_kaitai_struct_ExternalEnum;
|
|
56402
|
+
/** @constructor */
|
|
56403
|
+
function $c_Lio_kaitai_struct_ExternalUserType(classSpec) {
|
|
56404
|
+
this.Lio_kaitai_struct_ExternalUserType__f_classSpec = null;
|
|
56405
|
+
this.Lio_kaitai_struct_ExternalUserType__f_classSpec = classSpec
|
|
56406
|
+
}
|
|
56407
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype = new $h_Lio_kaitai_struct_ExternalType();
|
|
56408
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.constructor = $c_Lio_kaitai_struct_ExternalUserType;
|
|
56409
|
+
/** @constructor */
|
|
56410
|
+
function $h_Lio_kaitai_struct_ExternalUserType() {
|
|
56411
|
+
/*<skip>*/
|
|
56412
|
+
}
|
|
56413
|
+
$h_Lio_kaitai_struct_ExternalUserType.prototype = $c_Lio_kaitai_struct_ExternalUserType.prototype;
|
|
56414
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.name__sci_List = (function() {
|
|
56415
|
+
return $n(this.Lio_kaitai_struct_ExternalUserType__f_classSpec).Lio_kaitai_struct_format_ClassSpec__f_name
|
|
56416
|
+
});
|
|
56417
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.isOpaque__Z = (function() {
|
|
56418
|
+
return $n($n(this.Lio_kaitai_struct_ExternalUserType__f_classSpec).Lio_kaitai_struct_format_ClassSpec__f_meta).Lio_kaitai_struct_format_MetaSpec__f_isOpaque
|
|
56419
|
+
});
|
|
56420
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productPrefix__T = (function() {
|
|
56421
|
+
return "ExternalUserType"
|
|
56422
|
+
});
|
|
56423
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productArity__I = (function() {
|
|
56424
|
+
return 1
|
|
56425
|
+
});
|
|
56426
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productElement__I__O = (function(x$1) {
|
|
56427
|
+
return ((x$1 === 0) ? this.Lio_kaitai_struct_ExternalUserType__f_classSpec : $m_sr_Statics$().ioobe__I__O(x$1))
|
|
56428
|
+
});
|
|
56429
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.productIterator__sc_Iterator = (function() {
|
|
56430
|
+
return new $c_sr_ScalaRunTime$$anon$1(this)
|
|
56431
|
+
});
|
|
56432
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.hashCode__I = (function() {
|
|
56433
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
56434
|
+
return this$2.productHash__s_Product__I__Z__I(this, (-889275714), false)
|
|
56435
|
+
});
|
|
56436
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.toString__T = (function() {
|
|
56437
|
+
return $m_sr_ScalaRunTime$()._toString__s_Product__T(this)
|
|
56438
|
+
});
|
|
56439
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.equals__O__Z = (function(x$1) {
|
|
56440
|
+
if ((this === x$1)) {
|
|
56441
|
+
return true
|
|
56442
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_ExternalUserType)) {
|
|
56443
|
+
var ExternalUserType$1 = $as_Lio_kaitai_struct_ExternalUserType(x$1);
|
|
56444
|
+
var x = this.Lio_kaitai_struct_ExternalUserType__f_classSpec;
|
|
56445
|
+
var x$2 = $n(ExternalUserType$1).Lio_kaitai_struct_ExternalUserType__f_classSpec;
|
|
56446
|
+
if (((x === null) ? (x$2 === null) : $n(x).equals__O__Z(x$2))) {
|
|
56447
|
+
$n(ExternalUserType$1);
|
|
56448
|
+
return true
|
|
56449
|
+
} else {
|
|
56450
|
+
return false
|
|
56451
|
+
}
|
|
56452
|
+
} else {
|
|
56453
|
+
return false
|
|
56454
|
+
}
|
|
56455
|
+
});
|
|
56456
|
+
function $as_Lio_kaitai_struct_ExternalUserType(obj) {
|
|
56457
|
+
return (((obj instanceof $c_Lio_kaitai_struct_ExternalUserType) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.ExternalUserType"))
|
|
56458
|
+
}
|
|
56459
|
+
function $isArrayOf_Lio_kaitai_struct_ExternalUserType(obj, depth) {
|
|
56460
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_ExternalUserType)))
|
|
56461
|
+
}
|
|
56462
|
+
function $asArrayOf_Lio_kaitai_struct_ExternalUserType(obj, depth) {
|
|
56463
|
+
return (($isArrayOf_Lio_kaitai_struct_ExternalUserType(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.ExternalUserType;", depth))
|
|
56464
|
+
}
|
|
56465
|
+
var $d_Lio_kaitai_struct_ExternalUserType = new $TypeData().initClass({
|
|
56466
|
+
Lio_kaitai_struct_ExternalUserType: 0
|
|
56467
|
+
}, false, "io.kaitai.struct.ExternalUserType", {
|
|
56468
|
+
Lio_kaitai_struct_ExternalUserType: 1,
|
|
56469
|
+
Lio_kaitai_struct_ExternalType: 1,
|
|
56470
|
+
O: 1,
|
|
56471
|
+
s_Product: 1,
|
|
56472
|
+
s_Equals: 1,
|
|
56473
|
+
Ljava_io_Serializable: 1
|
|
56474
|
+
});
|
|
56475
|
+
$c_Lio_kaitai_struct_ExternalUserType.prototype.$classData = $d_Lio_kaitai_struct_ExternalUserType;
|
|
56476
|
+
/** @constructor */
|
|
56337
56477
|
function $c_Lio_kaitai_struct_NullLogger$() {
|
|
56338
56478
|
/*<skip>*/
|
|
56339
56479
|
}
|
|
@@ -56643,6 +56783,9 @@ $c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.asNonOwning__Z__Lio_ka
|
|
|
56643
56783
|
$c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.asNonOwning$default$1__Z = (function() {
|
|
56644
56784
|
return false
|
|
56645
56785
|
});
|
|
56786
|
+
$c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.isExternal__Lio_kaitai_struct_format_ClassSpec__Z = (function(curClass) {
|
|
56787
|
+
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)
|
|
56788
|
+
});
|
|
56646
56789
|
$c_Lio_kaitai_struct_datatype_DataType$EnumType.prototype.productPrefix__T = (function() {
|
|
56647
56790
|
return "EnumType"
|
|
56648
56791
|
});
|
|
@@ -60182,6 +60325,11 @@ $h_Lio_kaitai_struct_format_EnumSpec.prototype = $c_Lio_kaitai_struct_format_Enu
|
|
|
60182
60325
|
$c_Lio_kaitai_struct_format_EnumSpec.prototype.path__sci_List = (function() {
|
|
60183
60326
|
return this.Lio_kaitai_struct_format_EnumSpec__f_path
|
|
60184
60327
|
});
|
|
60328
|
+
$c_Lio_kaitai_struct_format_EnumSpec.prototype.isExternal__Lio_kaitai_struct_format_ClassSpec__Z = (function(curClass) {
|
|
60329
|
+
var x = $n(this.Lio_kaitai_struct_format_EnumSpec__f_name).head__O();
|
|
60330
|
+
var y = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_name).head__O();
|
|
60331
|
+
return (!$m_sr_BoxesRunTime$().equals__O__O__Z(x, y))
|
|
60332
|
+
});
|
|
60185
60333
|
$c_Lio_kaitai_struct_format_EnumSpec.prototype.productPrefix__T = (function() {
|
|
60186
60334
|
return "EnumSpec"
|
|
60187
60335
|
});
|
|
@@ -62415,7 +62563,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.publicMemberName__Lio_k
|
|
|
62415
62563
|
throw new $c_s_MatchError(id)
|
|
62416
62564
|
}
|
|
62417
62565
|
});
|
|
62418
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.
|
|
62566
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T = (function(importList, attrType) {
|
|
62419
62567
|
while (true) {
|
|
62420
62568
|
var rc72 = false;
|
|
62421
62569
|
var x2 = null;
|
|
@@ -62583,7 +62731,9 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeType__
|
|
|
62583
62731
|
};
|
|
62584
62732
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
62585
62733
|
var x69 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
62586
|
-
|
|
62734
|
+
var this$1 = $n(importList);
|
|
62735
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System.Collections.Generic");
|
|
62736
|
+
return (("List<" + this.kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(importList, $n(x69).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType)) + ">")
|
|
62587
62737
|
};
|
|
62588
62738
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
62589
62739
|
var x70 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
@@ -62593,8 +62743,8 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeType__
|
|
|
62593
62743
|
throw new $c_s_MatchError(x1)
|
|
62594
62744
|
}
|
|
62595
62745
|
});
|
|
62596
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.
|
|
62597
|
-
var r = this.
|
|
62746
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T = (function(importList, t, isNullable) {
|
|
62747
|
+
var r = this.kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(importList, t);
|
|
62598
62748
|
return (isNullable ? (((t instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) || (t instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType)) ? (r + "?") : r) : r)
|
|
62599
62749
|
});
|
|
62600
62750
|
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.types2class__sc_Iterable__T = (function(names) {
|
|
@@ -63079,11 +63229,17 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.ksErrorName__Lio_ka
|
|
|
63079
63229
|
return ("KaitaiStream." + $n(err).name__T())
|
|
63080
63230
|
}
|
|
63081
63231
|
});
|
|
63082
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.
|
|
63232
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.types2class__sci_List__Z__T = (function(types, isExternal) {
|
|
63233
|
+
if (isExternal) {
|
|
63234
|
+
var name = $as_T($n(types).head__O());
|
|
63235
|
+
var prefix = ($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name) + "_.")
|
|
63236
|
+
} else {
|
|
63237
|
+
var prefix = ""
|
|
63238
|
+
};
|
|
63083
63239
|
var this$3 = $n(types);
|
|
63084
63240
|
var f = ((name$2) => {
|
|
63085
|
-
var name = $as_T(name$2);
|
|
63086
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
63241
|
+
var name$1 = $as_T(name$2);
|
|
63242
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1)
|
|
63087
63243
|
});
|
|
63088
63244
|
if ((this$3 === $m_sci_Nil$())) {
|
|
63089
63245
|
var $$x1 = $m_sci_Nil$()
|
|
@@ -63102,7 +63258,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.types2class__sci_Li
|
|
|
63102
63258
|
var $$x1 = h
|
|
63103
63259
|
};
|
|
63104
63260
|
var this$4 = $n($$x1);
|
|
63105
|
-
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", "")
|
|
63261
|
+
return (prefix + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", ""))
|
|
63106
63262
|
});
|
|
63107
63263
|
var $d_Lio_kaitai_struct_languages_JavaScriptCompiler$ = new $TypeData().initClass({
|
|
63108
63264
|
Lio_kaitai_struct_languages_JavaScriptCompiler$: 0
|
|
@@ -63758,6 +63914,14 @@ $c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.types2class__sci_List__T
|
|
|
63758
63914
|
var this$4 = $n($$x1);
|
|
63759
63915
|
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", "::", "")
|
|
63760
63916
|
});
|
|
63917
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.enumValue__T__T__T = (function(enumName, label) {
|
|
63918
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
63919
|
+
var this$3 = $n(enumName);
|
|
63920
|
+
var $$x1 = $as_T(this$3.toUpperCase());
|
|
63921
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
63922
|
+
var this$6 = $n(label);
|
|
63923
|
+
return ((("$" + $$x1) + "_") + $as_T(this$6.toUpperCase()))
|
|
63924
|
+
});
|
|
63761
63925
|
var $d_Lio_kaitai_struct_languages_PerlCompiler$ = new $TypeData().initClass({
|
|
63762
63926
|
Lio_kaitai_struct_languages_PerlCompiler$: 0
|
|
63763
63927
|
}, false, "io.kaitai.struct.languages.PerlCompiler$", {
|
|
@@ -63837,7 +64001,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.ksErrorName__Lio_kaitai
|
|
|
63837
64001
|
}
|
|
63838
64002
|
}
|
|
63839
64003
|
});
|
|
63840
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.
|
|
64004
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.types2class__sci_List__Z__T = (function(name, isExternal) {
|
|
64005
|
+
var prefix = (isExternal ? ($n(name).head__O() + ".") : "");
|
|
63841
64006
|
var this$3 = $n(name);
|
|
63842
64007
|
var f = ((x$2) => {
|
|
63843
64008
|
var x = $as_T(x$2);
|
|
@@ -63860,7 +64025,20 @@ $c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.types2class__sci_List__
|
|
|
63860
64025
|
var $$x1 = h
|
|
63861
64026
|
};
|
|
63862
64027
|
var this$4 = $n($$x1);
|
|
63863
|
-
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", "")
|
|
64028
|
+
return (prefix + $f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", ".", ""))
|
|
64029
|
+
});
|
|
64030
|
+
$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) {
|
|
64031
|
+
var moduleName = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
64032
|
+
var this$4 = $n(importList);
|
|
64033
|
+
$m_sc_StringOps$();
|
|
64034
|
+
var x = $n(config).Lio_kaitai_struct_RuntimeConfig__f_pythonPackage;
|
|
64035
|
+
var this$3 = $n(x);
|
|
64036
|
+
if ((!(this$3 === ""))) {
|
|
64037
|
+
var s = ((("from " + $n(config).Lio_kaitai_struct_RuntimeConfig__f_pythonPackage) + " import ") + moduleName)
|
|
64038
|
+
} else {
|
|
64039
|
+
var s = ("import " + moduleName)
|
|
64040
|
+
};
|
|
64041
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$4.Lio_kaitai_struct_ImportList__f_list, s)
|
|
63864
64042
|
});
|
|
63865
64043
|
var $d_Lio_kaitai_struct_languages_PythonCompiler$ = new $TypeData().initClass({
|
|
63866
64044
|
Lio_kaitai_struct_languages_PythonCompiler$: 0
|
|
@@ -64285,10 +64463,7 @@ $c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.innerDocstr
|
|
|
64285
64463
|
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.fileFooter__T__V = (function(topClassName) {
|
|
64286
64464
|
/*<skip>*/
|
|
64287
64465
|
});
|
|
64288
|
-
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.
|
|
64289
|
-
/*<skip>*/
|
|
64290
|
-
});
|
|
64291
|
-
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
|
|
64466
|
+
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
64292
64467
|
/*<skip>*/
|
|
64293
64468
|
});
|
|
64294
64469
|
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.classDoc__sci_List__Lio_kaitai_struct_format_DocSpec__V = (function(name, doc) {
|
|
@@ -76191,6 +76366,17 @@ function $f_sc_StrictOptimizedSeqOps__distinctBy__F1__O($thiz, f) {
|
|
|
76191
76366
|
};
|
|
76192
76367
|
return $n(builder).result__O()
|
|
76193
76368
|
}
|
|
76369
|
+
function $f_sc_StrictOptimizedSeqOps__appended__O__O($thiz, elem) {
|
|
76370
|
+
var b = $n($thiz.iterableFactory__sc_SeqFactory()).newBuilder__scm_Builder();
|
|
76371
|
+
if (($thiz.knownSize__I() >= 0)) {
|
|
76372
|
+
$n(b).sizeHint__I__V(((1 + $thiz.length__I()) | 0))
|
|
76373
|
+
};
|
|
76374
|
+
var this$1 = $n(b);
|
|
76375
|
+
this$1.addAll__sc_IterableOnce__scm_Growable($thiz);
|
|
76376
|
+
var this$2 = $n(b);
|
|
76377
|
+
this$2.addOne__O__scm_Growable(elem);
|
|
76378
|
+
return $n(b).result__O()
|
|
76379
|
+
}
|
|
76194
76380
|
function $f_sc_StrictOptimizedSeqOps__appendedAll__sc_IterableOnce__O($thiz, suffix) {
|
|
76195
76381
|
var b = $n($thiz.iterableFactory__sc_SeqFactory()).newBuilder__scm_Builder();
|
|
76196
76382
|
var this$1 = $n(b);
|
|
@@ -82579,7 +82765,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82579
82765
|
var id = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_id;
|
|
82580
82766
|
var inType = $n(x7).Lio_kaitai_struct_exprlang_Ast$expr$EnumById__f_inType;
|
|
82581
82767
|
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);
|
|
82582
|
-
return this.
|
|
82768
|
+
return this.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T(enumSpec, this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(id, 0))
|
|
82583
82769
|
};
|
|
82584
82770
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel)) {
|
|
82585
82771
|
var x8 = $as_Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel(v);
|
|
@@ -82587,7 +82773,7 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
82587
82773
|
var label = $n(x8).Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel__f_label;
|
|
82588
82774
|
var inType$2 = $n(x8).Lio_kaitai_struct_exprlang_Ast$expr$EnumByLabel__f_inType;
|
|
82589
82775
|
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);
|
|
82590
|
-
return this.
|
|
82776
|
+
return this.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T(enumSpec$2, $n(label).Lio_kaitai_struct_exprlang_Ast$identifier__f_name)
|
|
82591
82777
|
};
|
|
82592
82778
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Name)) {
|
|
82593
82779
|
var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Name(v);
|
|
@@ -85283,7 +85469,7 @@ function $h_Lio_kaitai_struct_translators_CSharpTranslator() {
|
|
|
85283
85469
|
}
|
|
85284
85470
|
$h_Lio_kaitai_struct_translators_CSharpTranslator.prototype = $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype;
|
|
85285
85471
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
85286
|
-
var nativeType = $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
85472
|
+
var nativeType = $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList, t);
|
|
85287
85473
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85288
85474
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85289
85475
|
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
@@ -85343,11 +85529,11 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doName__T__T = (func
|
|
|
85343
85529
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
85344
85530
|
return ("" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
85345
85531
|
});
|
|
85346
|
-
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.
|
|
85347
|
-
return ((this.enumClass__sci_List__T(
|
|
85532
|
+
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
85533
|
+
return ((this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(label))
|
|
85348
85534
|
});
|
|
85349
|
-
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.
|
|
85350
|
-
return (((("((" + this.enumClass__sci_List__T(
|
|
85535
|
+
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
85536
|
+
return (((("((" + this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name)) + ") ") + id) + ")")
|
|
85351
85537
|
});
|
|
85352
85538
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.enumClass__sci_List__T = (function(enumTypeAbs) {
|
|
85353
85539
|
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);
|
|
@@ -85388,7 +85574,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doIfExp__Lio_kaitai_
|
|
|
85388
85574
|
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)) + ")")
|
|
85389
85575
|
});
|
|
85390
85576
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
85391
|
-
return (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
85577
|
+
return (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList, typeName)) + ") (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))")
|
|
85392
85578
|
});
|
|
85393
85579
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
85394
85580
|
var this$1 = $n(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList);
|
|
@@ -85510,13 +85696,15 @@ var $d_Lio_kaitai_struct_translators_CSharpTranslator = new $TypeData().initClas
|
|
|
85510
85696
|
});
|
|
85511
85697
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_CSharpTranslator;
|
|
85512
85698
|
/** @constructor */
|
|
85513
|
-
function $c_Lio_kaitai_struct_translators_JavaScriptTranslator(provider) {
|
|
85699
|
+
function $c_Lio_kaitai_struct_translators_JavaScriptTranslator(provider, importList) {
|
|
85514
85700
|
this.Lio_kaitai_struct_translators_TypeDetector__f_provider = null;
|
|
85515
85701
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_provider = null;
|
|
85516
85702
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHODS_BY_TYPE = null;
|
|
85517
85703
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_METHOD_PRECEDENCE = 0;
|
|
85518
85704
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
85519
85705
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
85706
|
+
this.Lio_kaitai_struct_translators_JavaScriptTranslator__f_importList = null;
|
|
85707
|
+
this.Lio_kaitai_struct_translators_JavaScriptTranslator__f_importList = importList;
|
|
85520
85708
|
$ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_translators_TypeProvider__(this, provider)
|
|
85521
85709
|
}
|
|
85522
85710
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
|
|
@@ -85604,14 +85792,22 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doName__T__T = (
|
|
|
85604
85792
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
85605
85793
|
return ("this." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
85606
85794
|
});
|
|
85607
|
-
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.
|
|
85608
|
-
var
|
|
85795
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
85796
|
+
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);
|
|
85797
|
+
if (isExternal) {
|
|
85798
|
+
var name = $as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).head__O());
|
|
85799
|
+
var className = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
85800
|
+
var this$2 = $n(this.Lio_kaitai_struct_translators_JavaScriptTranslator__f_importList);
|
|
85801
|
+
var s = ("./" + className);
|
|
85802
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, s)
|
|
85803
|
+
};
|
|
85804
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, isExternal);
|
|
85609
85805
|
$m_Lio_kaitai_struct_Utils$();
|
|
85610
|
-
var this$
|
|
85611
|
-
return (($$x1 + ".") + $as_T(this$
|
|
85806
|
+
var this$5 = $n(label);
|
|
85807
|
+
return (($$x1 + ".") + $as_T(this$5.toUpperCase()))
|
|
85612
85808
|
});
|
|
85613
|
-
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.
|
|
85614
|
-
return
|
|
85809
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
85810
|
+
return id
|
|
85615
85811
|
});
|
|
85616
85812
|
$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) {
|
|
85617
85813
|
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)")
|
|
@@ -85781,7 +85977,7 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIntLiteral__s_math_B
|
|
|
85781
85977
|
return (literal + suffix)
|
|
85782
85978
|
});
|
|
85783
85979
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
85784
|
-
var javaType = $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
85980
|
+
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);
|
|
85785
85981
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85786
85982
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85787
85983
|
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
@@ -85830,14 +86026,14 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doInternalName__Lio_ka
|
|
|
85830
86026
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
85831
86027
|
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
85832
86028
|
});
|
|
85833
|
-
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.
|
|
85834
|
-
var $$x1 = this.enumClass__sci_List__T(
|
|
86029
|
+
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86030
|
+
var $$x1 = this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
85835
86031
|
$m_Lio_kaitai_struct_Utils$();
|
|
85836
86032
|
var this$3 = $n(label);
|
|
85837
86033
|
return (($$x1 + ".") + $as_T(this$3.toUpperCase()))
|
|
85838
86034
|
});
|
|
85839
|
-
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.
|
|
85840
|
-
return (((this.enumClass__sci_List__T(
|
|
86035
|
+
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
86036
|
+
return (((this.enumClass__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".byId(") + id) + ")")
|
|
85841
86037
|
});
|
|
85842
86038
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.enumClass__sci_List__T = (function(enumTypeAbs) {
|
|
85843
86039
|
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);
|
|
@@ -85903,7 +86099,8 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIfExp__Lio_kaitai_st
|
|
|
85903
86099
|
});
|
|
85904
86100
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
85905
86101
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
85906
|
-
|
|
86102
|
+
var importList = this.Lio_kaitai_struct_translators_JavaTranslator__f_importList;
|
|
86103
|
+
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)) + "))")
|
|
85907
86104
|
});
|
|
85908
86105
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
85909
86106
|
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)) + ")")
|
|
@@ -86090,11 +86287,11 @@ $h_Lio_kaitai_struct_translators_NimTranslator.prototype = $c_Lio_kaitai_struct_
|
|
|
86090
86287
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.bytesToStr__T__T__T = (function(bytesExpr, encoding) {
|
|
86091
86288
|
return (((("encode(" + bytesExpr) + ", \"") + encoding) + "\")")
|
|
86092
86289
|
});
|
|
86093
|
-
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.
|
|
86094
|
-
return ((($m_Lio_kaitai_struct_languages_NimCompiler$().namespaced__sci_List__T(
|
|
86290
|
+
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
86291
|
+
return ((($m_Lio_kaitai_struct_languages_NimCompiler$().namespaced__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + "(") + id) + ")")
|
|
86095
86292
|
});
|
|
86096
|
-
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.
|
|
86097
|
-
return (($n(
|
|
86293
|
+
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86294
|
+
return (($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).head__O() + ".") + label)
|
|
86098
86295
|
});
|
|
86099
86296
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doName__T__T = (function(s) {
|
|
86100
86297
|
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)))))))))))
|
|
@@ -86476,23 +86673,30 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doInternalName__Lio_ka
|
|
|
86476
86673
|
var this$1 = $m_Lio_kaitai_struct_languages_PerlCompiler$();
|
|
86477
86674
|
return (("$self->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
86478
86675
|
});
|
|
86479
|
-
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.
|
|
86480
|
-
var
|
|
86481
|
-
|
|
86482
|
-
|
|
86676
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
86677
|
+
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);
|
|
86678
|
+
if (isExternal) {
|
|
86679
|
+
var this$2 = $n(this.Lio_kaitai_struct_translators_PerlTranslator__f_importList);
|
|
86680
|
+
var name = $as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).head__O());
|
|
86681
|
+
var s = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
86682
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, s)
|
|
86683
|
+
};
|
|
86684
|
+
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()));
|
|
86685
|
+
var this$3 = $n(enumClass);
|
|
86686
|
+
if ((this$3 === "")) {
|
|
86483
86687
|
var enumClassWithScope = ""
|
|
86484
86688
|
} else {
|
|
86485
86689
|
var enumClassWithScope = (enumClass + "::")
|
|
86486
86690
|
};
|
|
86487
86691
|
$m_Lio_kaitai_struct_Utils$();
|
|
86488
|
-
var s = $as_T($n(
|
|
86489
|
-
var this$
|
|
86490
|
-
var enumName = $as_T(this$
|
|
86692
|
+
var s$1 = $as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).last__O());
|
|
86693
|
+
var this$6 = $n(s$1);
|
|
86694
|
+
var enumName = $as_T(this$6.toUpperCase());
|
|
86491
86695
|
$m_Lio_kaitai_struct_Utils$();
|
|
86492
|
-
var this$
|
|
86493
|
-
return (((("$" + enumClassWithScope) + enumName) + "_") + $as_T(this$
|
|
86696
|
+
var this$9 = $n(label);
|
|
86697
|
+
return (((("$" + enumClassWithScope) + enumName) + "_") + $as_T(this$9.toUpperCase()))
|
|
86494
86698
|
});
|
|
86495
|
-
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.
|
|
86699
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
86496
86700
|
return id
|
|
86497
86701
|
});
|
|
86498
86702
|
$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) {
|
|
@@ -86728,8 +86932,9 @@ var $d_Lio_kaitai_struct_translators_PerlTranslator = new $TypeData().initClass(
|
|
|
86728
86932
|
Lio_kaitai_struct_translators_ByteArraysAsTrueArrays: 1
|
|
86729
86933
|
});
|
|
86730
86934
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.$classData = $d_Lio_kaitai_struct_translators_PerlTranslator;
|
|
86731
|
-
function $
|
|
86935
|
+
function $ct_Lio_kaitai_struct_translators_PythonTranslator__Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_RuntimeConfig__($thiz, provider, importList, config) {
|
|
86732
86936
|
$thiz.Lio_kaitai_struct_translators_PythonTranslator__f_importList = importList;
|
|
86937
|
+
$thiz.Lio_kaitai_struct_translators_PythonTranslator__f_config = config;
|
|
86733
86938
|
$ct_Lio_kaitai_struct_translators_BaseTranslator__Lio_kaitai_struct_translators_TypeProvider__($thiz, provider);
|
|
86734
86939
|
var this$22 = $n($m_s_Predef$().s_Predef$__f_Map);
|
|
86735
86940
|
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")];
|
|
@@ -86746,6 +86951,7 @@ function $c_Lio_kaitai_struct_translators_PythonTranslator() {
|
|
|
86746
86951
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
86747
86952
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
86748
86953
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_importList = null;
|
|
86954
|
+
this.Lio_kaitai_struct_translators_PythonTranslator__f_config = null;
|
|
86749
86955
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_asciiCharQuoteMap = null
|
|
86750
86956
|
}
|
|
86751
86957
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype = new $h_Lio_kaitai_struct_translators_BaseTranslator();
|
|
@@ -86805,11 +87011,15 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doName__T__T = (func
|
|
|
86805
87011
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
86806
87012
|
return ("self." + $m_Lio_kaitai_struct_languages_PythonCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
86807
87013
|
});
|
|
86808
|
-
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.
|
|
86809
|
-
|
|
87014
|
+
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87015
|
+
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);
|
|
87016
|
+
if (isExternal) {
|
|
87017
|
+
$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)
|
|
87018
|
+
};
|
|
87019
|
+
return (($m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__Z__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name, isExternal) + ".") + label)
|
|
86810
87020
|
});
|
|
86811
|
-
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.
|
|
86812
|
-
return (((("KaitaiStream.resolve_enum(" + $m_Lio_kaitai_struct_languages_PythonCompiler$().
|
|
87021
|
+
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
87022
|
+
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) + ")")
|
|
86813
87023
|
});
|
|
86814
87024
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.booleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__T = (function(op) {
|
|
86815
87025
|
var x = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
|
|
@@ -87040,11 +87250,11 @@ $c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doInternalName__Lio_ka
|
|
|
87040
87250
|
var this$1 = $m_Lio_kaitai_struct_languages_RubyCompiler$();
|
|
87041
87251
|
return this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
87042
87252
|
});
|
|
87043
|
-
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.
|
|
87044
|
-
return (((
|
|
87253
|
+
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87254
|
+
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)
|
|
87045
87255
|
});
|
|
87046
|
-
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.
|
|
87047
|
-
return (((("Kaitai::Struct::Stream::resolve_enum(" + this.enumDirectMap__sci_List__T(
|
|
87256
|
+
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
87257
|
+
return (((("Kaitai::Struct::Stream::resolve_enum(" + this.enumDirectMap__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name)) + ", ") + id) + ")")
|
|
87048
87258
|
});
|
|
87049
87259
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.enumDirectMap__sci_List__T = (function(enumTypeAndName) {
|
|
87050
87260
|
var this$1 = $n(enumTypeAndName);
|
|
@@ -87305,13 +87515,13 @@ $c_Lio_kaitai_struct_translators_RustTranslator.prototype.doLocalName__T__T = (f
|
|
|
87305
87515
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doName__T__T = (function(s) {
|
|
87306
87516
|
return s
|
|
87307
87517
|
});
|
|
87308
|
-
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.
|
|
87309
|
-
var enumClass = this.types2classAbs__sci_List__T(
|
|
87518
|
+
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
87519
|
+
var enumClass = this.types2classAbs__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
87310
87520
|
$m_Lio_kaitai_struct_Utils$();
|
|
87311
87521
|
var this$3 = $n(label);
|
|
87312
87522
|
return ((enumClass + "::") + $as_T(this$3.toUpperCase()))
|
|
87313
87523
|
});
|
|
87314
|
-
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.
|
|
87524
|
+
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
87315
87525
|
return id
|
|
87316
87526
|
});
|
|
87317
87527
|
$c_Lio_kaitai_struct_translators_RustTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
@@ -88041,8 +88251,9 @@ function $c_Lio_kaitai_struct_translators_ConstructTranslator(provider, importLi
|
|
|
88041
88251
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_OPERATOR_PRECEDENCE = null;
|
|
88042
88252
|
this.Lio_kaitai_struct_translators_BaseTranslator__f_asciiCharQuoteMap = null;
|
|
88043
88253
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_importList = null;
|
|
88254
|
+
this.Lio_kaitai_struct_translators_PythonTranslator__f_config = null;
|
|
88044
88255
|
this.Lio_kaitai_struct_translators_PythonTranslator__f_asciiCharQuoteMap = null;
|
|
88045
|
-
$
|
|
88256
|
+
$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", ""))
|
|
88046
88257
|
}
|
|
88047
88258
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype = new $h_Lio_kaitai_struct_translators_PythonTranslator();
|
|
88048
88259
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.constructor = $c_Lio_kaitai_struct_translators_ConstructTranslator;
|
|
@@ -88057,7 +88268,7 @@ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doLocalName__T__T
|
|
|
88057
88268
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doName__T__T = (function(s) {
|
|
88058
88269
|
return (($m_Lio_kaitai_struct_format_Identifier$().Lio_kaitai_struct_format_Identifier$__f_PARENT === s) ? "_" : s)
|
|
88059
88270
|
});
|
|
88060
|
-
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.
|
|
88271
|
+
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88061
88272
|
return (("'" + label) + "'")
|
|
88062
88273
|
});
|
|
88063
88274
|
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.kaitaiStreamSize__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
@@ -88226,7 +88437,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.asciiCharQuoteMap__sci_
|
|
|
88226
88437
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, values) {
|
|
88227
88438
|
if ($n($n(this.Lio_kaitai_struct_translators_CppTranslator__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_useListInitializers) {
|
|
88228
88439
|
$n(this.Lio_kaitai_struct_translators_CppTranslator__f_importListHdr).addSystem__T__V("vector");
|
|
88229
|
-
var cppElType = $m_Lio_kaitai_struct_languages_CppCompiler$().
|
|
88440
|
+
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);
|
|
88230
88441
|
var this$2 = $n($as_sc_IterableOnceOps($n(values).map__F1__O(new $c_sjsr_AnonFunction1(((value$2) => {
|
|
88231
88442
|
var value = $as_Lio_kaitai_struct_exprlang_Ast$expr(value$2);
|
|
88232
88443
|
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)
|
|
@@ -88280,16 +88491,20 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doInternalName__Lio_kai
|
|
|
88280
88491
|
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
88281
88492
|
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
88282
88493
|
});
|
|
88283
|
-
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.
|
|
88494
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88495
|
+
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);
|
|
88496
|
+
if (isExternal) {
|
|
88497
|
+
$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())))
|
|
88498
|
+
};
|
|
88284
88499
|
var $$x2 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
88285
|
-
var this$1 = $n(
|
|
88500
|
+
var this$1 = $n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
88286
88501
|
var $$x1 = $n($$x2).types2class__sci_List__T($as_sci_List($f_sc_StrictOptimizedIterableOps__dropRight__I__O(this$1, 1)));
|
|
88287
88502
|
$m_Lio_kaitai_struct_Utils$();
|
|
88288
|
-
var s = (($as_T($n(
|
|
88503
|
+
var s = (($as_T($n($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name).last__O()) + "_") + label);
|
|
88289
88504
|
return (($$x1 + "::") + $as_T(s.toUpperCase()))
|
|
88290
88505
|
});
|
|
88291
|
-
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.
|
|
88292
|
-
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(
|
|
88506
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
88507
|
+
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name)) + ">(") + id) + ")")
|
|
88293
88508
|
});
|
|
88294
88509
|
$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) {
|
|
88295
88510
|
var x$2 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
@@ -88323,7 +88538,7 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doIfExp__Lio_kaitai_str
|
|
|
88323
88538
|
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)) + "))")
|
|
88324
88539
|
});
|
|
88325
88540
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
88326
|
-
return (((("static_cast<" + $m_Lio_kaitai_struct_languages_CppCompiler$().
|
|
88541
|
+
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)) + ")")
|
|
88327
88542
|
});
|
|
88328
88543
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
88329
88544
|
var baseStr = this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(base, 0);
|
|
@@ -88593,11 +88808,11 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doName__T__T = (functio
|
|
|
88593
88808
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
88594
88809
|
return ("self." + $m_Lio_kaitai_struct_languages_LuaCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
88595
88810
|
});
|
|
88596
|
-
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.
|
|
88597
|
-
return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(
|
|
88811
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
88812
|
+
return (($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + ".") + label)
|
|
88598
88813
|
});
|
|
88599
|
-
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.
|
|
88600
|
-
return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(
|
|
88814
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
88815
|
+
return ((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name) + "(") + id) + ")")
|
|
88601
88816
|
});
|
|
88602
88817
|
$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) {
|
|
88603
88818
|
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))
|
|
@@ -88930,13 +89145,13 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doInternalName__Lio_kai
|
|
|
88930
89145
|
var this$1 = $m_Lio_kaitai_struct_languages_PHPCompiler$();
|
|
88931
89146
|
return (("$this->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
88932
89147
|
});
|
|
88933
|
-
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.
|
|
88934
|
-
var enumClass = this.types2classAbs__sci_List__T(
|
|
89148
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumByLabel__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, label) {
|
|
89149
|
+
var enumClass = this.types2classAbs__sci_List__T($n(enumSpec).Lio_kaitai_struct_format_EnumSpec__f_name);
|
|
88935
89150
|
$m_Lio_kaitai_struct_Utils$();
|
|
88936
89151
|
var this$3 = $n(label);
|
|
88937
89152
|
return ((enumClass + "::") + $as_T(this$3.toUpperCase()))
|
|
88938
89153
|
});
|
|
88939
|
-
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.
|
|
89154
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doEnumById__Lio_kaitai_struct_format_EnumSpec__T__T = (function(enumSpec, id) {
|
|
88940
89155
|
return id
|
|
88941
89156
|
});
|
|
88942
89157
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
@@ -90099,7 +90314,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.results__Lio_kaitai_struct_
|
|
|
90099
90314
|
var this$2 = $n(this$1.Lio_kaitai_struct_format_ClassSpec__f_name);
|
|
90100
90315
|
var className = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "::", "");
|
|
90101
90316
|
var this$18 = $n($m_s_Predef$().s_Predef$__f_Map);
|
|
90102
|
-
var self =
|
|
90317
|
+
var self = $m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameSource__T__T(className);
|
|
90103
90318
|
var this$4 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrcHeader);
|
|
90104
90319
|
var this$5 = $n(this$4.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb);
|
|
90105
90320
|
var $$x4 = $n(this$5.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content;
|
|
@@ -90108,7 +90323,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.results__Lio_kaitai_struct_
|
|
|
90108
90323
|
var this$7 = $n(this$6.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb);
|
|
90109
90324
|
var y = ((("" + $$x4) + $$x3) + $n(this$7.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content);
|
|
90110
90325
|
var $$x5 = new $c_T2(self, y);
|
|
90111
|
-
var self$1 =
|
|
90326
|
+
var self$1 = $m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T(className);
|
|
90112
90327
|
var this$10 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader);
|
|
90113
90328
|
var this$11 = $n(this$10.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb);
|
|
90114
90329
|
var $$x2 = $n(this$11.scm_StringBuilder__f_underlying).jl_StringBuilder__f_java$lang$StringBuilder$$content;
|
|
@@ -90123,17 +90338,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.results__Lio_kaitai_struct_
|
|
|
90123
90338
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.indent__T = (function() {
|
|
90124
90339
|
return " "
|
|
90125
90340
|
});
|
|
90126
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.outFileNameSource__T__T = (function(className) {
|
|
90127
|
-
return (className + ".cpp")
|
|
90128
|
-
});
|
|
90129
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.outFileNameHeader__T__T = (function(className) {
|
|
90130
|
-
return (className + ".h")
|
|
90131
|
-
});
|
|
90132
90341
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
90133
90342
|
$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");
|
|
90134
90343
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrcHeader);
|
|
90135
90344
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90136
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V(
|
|
90345
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V($m_Lio_kaitai_struct_languages_CppCompiler$().outFileNameHeader__T__T(topClassName));
|
|
90137
90346
|
if ($n($n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_cppConfig).Lio_kaitai_struct_CppRuntimeConfig__f_usePragmaOnce) {
|
|
90138
90347
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader).puts__T__V("#pragma once")
|
|
90139
90348
|
} else {
|
|
@@ -90145,8 +90354,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileHeader__T__V = (functio
|
|
|
90145
90354
|
$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");
|
|
90146
90355
|
var this$3 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader);
|
|
90147
90356
|
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90148
|
-
|
|
90149
|
-
this$4
|
|
90357
|
+
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader).puts__T__V((("class " + $m_Lio_kaitai_struct_languages_CppCompiler$().type2class__T__T(topClassName)) + ";"));
|
|
90358
|
+
var this$4 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdrHeader);
|
|
90359
|
+
$n(this$4.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90360
|
+
var this$5 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr);
|
|
90361
|
+
this$5.addLocal__T__V("kaitai/kaitaistruct.h");
|
|
90150
90362
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListHdr).addSystem__T__V("stdint.h");
|
|
90151
90363
|
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;
|
|
90152
90364
|
var x = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
@@ -90159,13 +90371,13 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileHeader__T__V = (functio
|
|
|
90159
90371
|
}
|
|
90160
90372
|
};
|
|
90161
90373
|
var minVer = $n($m_Lio_kaitai_struct_format_KSVersion$().Lio_kaitai_struct_format_KSVersion$__f_minimalRuntime).toInt__I();
|
|
90162
|
-
var this$
|
|
90163
|
-
$n(this$
|
|
90374
|
+
var this$6 = $n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr);
|
|
90375
|
+
$n(this$6.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
90164
90376
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V((("#if KAITAI_STRUCT_VERSION < " + minVer) + "L"));
|
|
90165
90377
|
$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\""));
|
|
90166
90378
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V("#endif");
|
|
90167
|
-
var this$
|
|
90168
|
-
var these = this$
|
|
90379
|
+
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);
|
|
90380
|
+
var these = this$7;
|
|
90169
90381
|
while ((!$n(these).isEmpty__Z())) {
|
|
90170
90382
|
var arg1 = $n(these).head__O();
|
|
90171
90383
|
var namespace = $as_T(arg1);
|
|
@@ -90194,9 +90406,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileFooter__T__V = (functio
|
|
|
90194
90406
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outHdr).puts__T__V(("#endif // " + this.defineName__T__T(topClassName)))
|
|
90195
90407
|
}
|
|
90196
90408
|
});
|
|
90197
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.
|
|
90198
|
-
this.
|
|
90199
|
-
$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())))
|
|
90409
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
90410
|
+
$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())))
|
|
90200
90411
|
});
|
|
90201
90412
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
90202
90413
|
var $$x1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
@@ -90223,7 +90434,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.importDataType__Lio_kaitai_
|
|
|
90223
90434
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dt);
|
|
90224
90435
|
var classSpec = $as_Lio_kaitai_struct_format_ClassSpec($n($n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O());
|
|
90225
90436
|
if ($n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_isTopLevel) {
|
|
90226
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V(
|
|
90437
|
+
$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())))
|
|
90227
90438
|
}
|
|
90228
90439
|
}
|
|
90229
90440
|
});
|
|
@@ -90281,7 +90492,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classConstructorHeader__sci
|
|
|
90281
90492
|
$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)) + ") {"));
|
|
90282
90493
|
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_outSrc).inc__V();
|
|
90283
90494
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_ParentIdentifier$(), pParent);
|
|
90284
|
-
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)) ? "this" : pRoot));
|
|
90495
|
+
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));
|
|
90285
90496
|
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;
|
|
90286
90497
|
matchEnd12: {
|
|
90287
90498
|
var $$x4;
|
|
@@ -90694,7 +90905,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
90694
90905
|
var this$3 = $n($$x1);
|
|
90695
90906
|
var procClass = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$3, "", "::", "");
|
|
90696
90907
|
var procName$2 = ("_process_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
90697
|
-
$n(this.Lio_kaitai_struct_languages_CppCompiler__f_importListSrc).addLocal__T__V(
|
|
90908
|
+
$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())));
|
|
90698
90909
|
var this$4 = $n($as_sc_IterableOnceOps($n(args).map__F1__O(new $c_sjsr_AnonFunction1(((e$2) => {
|
|
90699
90910
|
var e = $as_Lio_kaitai_struct_exprlang_Ast$expr(e$2);
|
|
90700
90911
|
return $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, e)
|
|
@@ -91287,7 +91498,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.type2class__T__T = (functio
|
|
|
91287
91498
|
return $m_Lio_kaitai_struct_languages_CppCompiler$().type2class__T__T(className)
|
|
91288
91499
|
});
|
|
91289
91500
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T = (function(attrType, absolute) {
|
|
91290
|
-
return $m_Lio_kaitai_struct_languages_CppCompiler$().
|
|
91501
|
+
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)
|
|
91291
91502
|
});
|
|
91292
91503
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.nullPtr__T = (function() {
|
|
91293
91504
|
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;
|
|
@@ -92701,7 +92912,7 @@ function $c_Lio_kaitai_struct_languages_JavaScriptCompiler(typeProvider, config)
|
|
|
92701
92912
|
this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_importList = null;
|
|
92702
92913
|
$ct_Lio_kaitai_struct_languages_components_LanguageCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__(this, typeProvider, config);
|
|
92703
92914
|
$f_Lio_kaitai_struct_languages_components_SingleOutputFile__$init$__V(this);
|
|
92704
|
-
this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator = new $c_Lio_kaitai_struct_translators_JavaScriptTranslator(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_typeProvider);
|
|
92915
|
+
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);
|
|
92705
92916
|
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))
|
|
92706
92917
|
}
|
|
92707
92918
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype = new $h_Lio_kaitai_struct_languages_components_LanguageCompiler();
|
|
@@ -92822,7 +93033,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.outImports__Lio_kait
|
|
|
92822
93033
|
var this$7 = $n($$x1);
|
|
92823
93034
|
var this$8 = $n(this$7.prepended__O__sci_List("exports"));
|
|
92824
93035
|
var exportsArgs = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$8, "", ", ", "");
|
|
92825
|
-
var rassoc$3 = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().
|
|
93036
|
+
var rassoc$3 = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n(topClass).Lio_kaitai_struct_format_ClassSpec__f_name, false);
|
|
92826
93037
|
var this$11 = $n(impList);
|
|
92827
93038
|
var f$2 = ((x$4$2) => {
|
|
92828
93039
|
var x$4 = $as_T(x$4$2);
|
|
@@ -92907,8 +93118,8 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.fileFooter__T__V = (
|
|
|
92907
93118
|
$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)) + ";"));
|
|
92908
93119
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("});")
|
|
92909
93120
|
});
|
|
92910
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.
|
|
92911
|
-
var name = $as_T($n($n(
|
|
93121
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
93122
|
+
var name = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
92912
93123
|
var className = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
92913
93124
|
var this$1 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_importList);
|
|
92914
93125
|
var s = ("./" + className);
|
|
@@ -92919,7 +93130,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classHeader__sci_Lis
|
|
|
92919
93130
|
var shortClassName = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1);
|
|
92920
93131
|
var this$1 = $n(name);
|
|
92921
93132
|
if ((this$1.length__I() > 1)) {
|
|
92922
|
-
var addNameExpr = (" = " + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().
|
|
93133
|
+
var addNameExpr = (" = " + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().types2class__sci_List__Z__T($n(name).takeRight__I__sci_List(2), false))
|
|
92923
93134
|
} else {
|
|
92924
93135
|
var addNameExpr = ""
|
|
92925
93136
|
};
|
|
@@ -92969,7 +93180,11 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classConstructorHead
|
|
|
92969
93180
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).inc__V();
|
|
92970
93181
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._io = _io;");
|
|
92971
93182
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._parent = _parent;");
|
|
92972
|
-
|
|
93183
|
+
if (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName))) {
|
|
93184
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._root = _root || this;")
|
|
93185
|
+
} else {
|
|
93186
|
+
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._root = _root;")
|
|
93187
|
+
};
|
|
92973
93188
|
if (isHybrid) {
|
|
92974
93189
|
$n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_out).puts__T__V("this._is_le = _is_le;")
|
|
92975
93190
|
};
|
|
@@ -93190,7 +93405,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugStart__Lio_
|
|
|
93190
93405
|
};
|
|
93191
93406
|
if ((attrType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
93192
93407
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(attrType);
|
|
93193
|
-
var enumNameProps = (("enumName: \"" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().
|
|
93408
|
+
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)) + "\"")
|
|
93194
93409
|
} else {
|
|
93195
93410
|
var enumNameProps = ""
|
|
93196
93411
|
};
|
|
@@ -93344,25 +93559,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.parseExpr__Lio_kaita
|
|
|
93344
93559
|
var this$3 = $n(this.Lio_kaitai_struct_languages_JavaScriptCompiler__f_translator);
|
|
93345
93560
|
return this$3.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(a, 0)
|
|
93346
93561
|
})))), ", ", ", ", "");
|
|
93347
|
-
|
|
93348
|
-
if (this$4.isEmpty__Z()) {
|
|
93349
|
-
var $$x1 = $m_s_None$()
|
|
93350
|
-
} else {
|
|
93351
|
-
var arg1 = this$4.get__O();
|
|
93352
|
-
var classSpec = $as_Lio_kaitai_struct_format_ClassSpec(arg1);
|
|
93353
|
-
var x$1 = $n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name;
|
|
93354
|
-
var x$2 = $n(classSpec).Lio_kaitai_struct_format_ClassSpec__f_name;
|
|
93355
|
-
var $$x1 = new $c_s_Some(((x$1 === null) ? (x$2 === null) : $n(x$1).equals__O__Z(x$2)))
|
|
93356
|
-
};
|
|
93357
|
-
var this$5 = $n($$x1);
|
|
93358
|
-
if ($uZ((this$5.isEmpty__Z() ? false : this$5.get__O()))) {
|
|
93359
|
-
var this$6 = $n($n(x10).Lio_kaitai_struct_datatype_DataType$UserType__f_name);
|
|
93360
|
-
var name = $as_T($f_sc_LinearSeqOps__apply__I__O(this$6, 0));
|
|
93361
|
-
var topLevelModulePrefix = ($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name) + "_.")
|
|
93362
|
-
} else {
|
|
93363
|
-
var topLevelModulePrefix = ""
|
|
93364
|
-
};
|
|
93365
|
-
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) + ")")
|
|
93562
|
+
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) + ")")
|
|
93366
93563
|
} else {
|
|
93367
93564
|
throw new $c_s_MatchError(dataType)
|
|
93368
93565
|
}
|
|
@@ -93850,9 +94047,10 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classConstructorHeader__sci
|
|
|
93850
94047
|
var pRoot = this.paramName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_RootIdentifier$());
|
|
93851
94048
|
var tParent = this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(parentType);
|
|
93852
94049
|
var tRoot = $n(this.Lio_kaitai_struct_languages_PHPCompiler__f_translator).types2classAbs__sci_List__T(rootClassName);
|
|
94050
|
+
var pRootValue = (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName)) ? ((pRoot + " === null ? $this : ") + pRoot) : pRoot);
|
|
93853
94051
|
$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) + ") {"));
|
|
93854
94052
|
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).inc__V();
|
|
93855
|
-
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((((("parent::__construct(" + pIo) + ", ") + pParent) + ", ") +
|
|
94053
|
+
$n(this.Lio_kaitai_struct_languages_PHPCompiler__f_out).puts__T__V((((((("parent::__construct(" + pIo) + ", ") + pParent) + ", ") + pRootValue) + ");"));
|
|
93856
94054
|
if (isHybrid) {
|
|
93857
94055
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_EndianIdentifier$(), "$is_le")
|
|
93858
94056
|
};
|
|
@@ -94586,10 +94784,11 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.fileFooter__T__V = (functi
|
|
|
94586
94784
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94587
94785
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("1;")
|
|
94588
94786
|
});
|
|
94589
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.
|
|
94590
|
-
var
|
|
94591
|
-
var name = $as_T($n($n(
|
|
94592
|
-
|
|
94787
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
94788
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_importList);
|
|
94789
|
+
var name = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
94790
|
+
var s = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
94791
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
94593
94792
|
});
|
|
94594
94793
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
94595
94794
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
@@ -94617,6 +94816,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classFooter__sci_List__V =
|
|
|
94617
94816
|
});
|
|
94618
94817
|
$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) {
|
|
94619
94818
|
var endianSuffix = (isHybrid ? ", $_is_le" : "");
|
|
94819
|
+
var pRootValue = (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName)) ? "$_root || $self" : "$_root");
|
|
94620
94820
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
94621
94821
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94622
94822
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("sub new {");
|
|
@@ -94627,7 +94827,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classConstructorHeader__sc
|
|
|
94627
94827
|
$n(this$2.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
94628
94828
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out).puts__T__V("bless $self, $class;");
|
|
94629
94829
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_ParentIdentifier$(), "$_parent");
|
|
94630
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_RootIdentifier$(),
|
|
94830
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_RootIdentifier$(), pRootValue);
|
|
94631
94831
|
if (isHybrid) {
|
|
94632
94832
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_EndianIdentifier$(), "$_is_le")
|
|
94633
94833
|
};
|
|
@@ -94996,7 +95196,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List_
|
|
|
94996
95196
|
var hi = t.RTLong__f_hi;
|
|
94997
95197
|
var label = $as_Lio_kaitai_struct_format_EnumValueSpec($n(x0$1).T2__f__2);
|
|
94998
95198
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
94999
|
-
var $$x1 =
|
|
95199
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_PerlCompiler$().enumValue__T__T__T(enumName, $n(label).Lio_kaitai_struct_format_EnumValueSpec__f_name);
|
|
95000
95200
|
$n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator);
|
|
95001
95201
|
var this$4 = $m_s_math_BigInt$();
|
|
95002
95202
|
var n = this$4.apply__J__s_math_BigInt(new $c_RTLong(lo, hi));
|
|
@@ -95006,13 +95206,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumDeclaration__sci_List_
|
|
|
95006
95206
|
}
|
|
95007
95207
|
})))
|
|
95008
95208
|
});
|
|
95009
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.enumValue__T__T__T = (function(enumName, enumLabel) {
|
|
95010
|
-
var $$x1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_translator);
|
|
95011
|
-
$n($m_s_package$().s_package$__f_List);
|
|
95012
|
-
var array = [enumName];
|
|
95013
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
95014
|
-
return $n($$x1).doEnumByLabel__sci_List__T__T($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems), enumLabel)
|
|
95015
|
-
});
|
|
95016
95209
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classToString__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(toStringExpr) {
|
|
95017
95210
|
var this$1 = $n(this.Lio_kaitai_struct_languages_PerlCompiler__f_out);
|
|
95018
95211
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
@@ -95224,14 +95417,14 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.fileHeader__T__V = (functi
|
|
|
95224
95417
|
var this$10 = $n(this.Lio_kaitai_struct_languages_RustCompiler__f_out);
|
|
95225
95418
|
$n(this$10.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
95226
95419
|
});
|
|
95227
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.
|
|
95228
|
-
var name = $as_T($n($n(
|
|
95229
|
-
var
|
|
95230
|
-
var names = $n(
|
|
95420
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
95421
|
+
var name = $as_T($n($n(extType).name__sci_List()).last__O());
|
|
95422
|
+
var className = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
95423
|
+
var names = $n(extType).name__sci_List();
|
|
95231
95424
|
var this$1 = $n(names);
|
|
95232
95425
|
var pkg = $f_sc_IterableOnceOps__mkString__T__T__T__T(this$1, "", "::", "");
|
|
95233
95426
|
var this$2 = $n(this.Lio_kaitai_struct_languages_RustCompiler__f_importList);
|
|
95234
|
-
var s = ((pkg + "::") +
|
|
95427
|
+
var s = ((pkg + "::") + className);
|
|
95235
95428
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, s)
|
|
95236
95429
|
});
|
|
95237
95430
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
@@ -96538,7 +96731,8 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
96538
96731
|
var this$2 = $n(params);
|
|
96539
96732
|
var f = ((p$2) => {
|
|
96540
96733
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
96541
|
-
|
|
96734
|
+
var attrType = $n(p).Lio_kaitai_struct_format_ParamDefSpec__f_dataType;
|
|
96735
|
+
return (($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType) + " ") + this.paramName__Lio_kaitai_struct_format_Identifier__T($n(p).Lio_kaitai_struct_format_ParamDefSpec__f_id))
|
|
96542
96736
|
});
|
|
96543
96737
|
if ((this$2 === $m_sci_Nil$())) {
|
|
96544
96738
|
var $$x2 = $m_sci_Nil$()
|
|
@@ -96557,7 +96751,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
96557
96751
|
var $$x2 = h
|
|
96558
96752
|
};
|
|
96559
96753
|
var paramsArg = $n($$x3).join__sc_IterableOnce__T__T__T__T($$x2, "", ", ", ", ");
|
|
96560
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((((((("public " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(") + paramsArg) + ("KaitaiStream " + pIo)) + ", ") + (($m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96754
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((((((("public " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(") + paramsArg) + ("KaitaiStream " + pIo)) + ", ") + (($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, parentType) + " ") + pParent)) + " = null, ") + (((((($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(rootClassName) + " ") + pRoot) + " = null") + addEndian) + ") : base(") + pIo)) + ")"));
|
|
96561
96755
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
96562
96756
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96563
96757
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_ParentIdentifier$(), pParent);
|
|
@@ -96625,10 +96819,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readFooter__V = (functio
|
|
|
96625
96819
|
this.fileFooter__T__V("")
|
|
96626
96820
|
});
|
|
96627
96821
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
96628
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96822
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
96629
96823
|
});
|
|
96630
96824
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
96631
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96825
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + " { get { return ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; } }"))
|
|
96632
96826
|
});
|
|
96633
96827
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
96634
96828
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
@@ -96760,7 +96954,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condIfFooter__Lio_kaitai
|
|
|
96760
96954
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
96761
96955
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList);
|
|
96762
96956
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System.Collections.Generic");
|
|
96763
|
-
|
|
96957
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96958
|
+
var $$x1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
96959
|
+
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(dataType);
|
|
96960
|
+
$n($$x2).puts__T__V(((($$x1 + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType)) + "();"))
|
|
96764
96961
|
});
|
|
96765
96962
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
96766
96963
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
@@ -96794,7 +96991,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilHeader__L
|
|
|
96794
96991
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
96795
96992
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96796
96993
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("var i = 0;");
|
|
96797
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96994
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType) + " ") + $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator).doName__T__T("_")) + ";"));
|
|
96798
96995
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("do {");
|
|
96799
96996
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V()
|
|
96800
96997
|
});
|
|
@@ -96825,7 +97022,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentSimple__
|
|
|
96825
97022
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
96826
97023
|
});
|
|
96827
97024
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
96828
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((($m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97025
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType) + " ") + id) + " = ") + expr) + ";"))
|
|
96829
97026
|
});
|
|
96830
97027
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.blockScopeHeader__V = (function() {
|
|
96831
97028
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
@@ -96946,7 +97143,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.bytesPadTermExpr__T__s_O
|
|
|
96946
97143
|
return expr2
|
|
96947
97144
|
});
|
|
96948
97145
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
96949
|
-
var expr = ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType))) ? (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97146
|
+
var expr = ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType))) ? (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType)) + ") (") + id) + "))") : id);
|
|
96950
97147
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((expr + "._read();"))
|
|
96951
97148
|
});
|
|
96952
97149
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchRequiresIfs__Lio_kaitai_struct_datatype_DataType__Z = (function(onType) {
|
|
@@ -96978,7 +97175,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfStart__Lio_kaita
|
|
|
96978
97175
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
96979
97176
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96980
97177
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96981
|
-
var $$x1 = $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97178
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, onType);
|
|
96982
97179
|
var e = this.Lio_kaitai_struct_languages_CSharpCompiler__f_NAME_SWITCH_ON;
|
|
96983
97180
|
$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)) + ";"))
|
|
96984
97181
|
});
|
|
@@ -97011,10 +97208,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfEnd__V = (functi
|
|
|
97011
97208
|
});
|
|
97012
97209
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
97013
97210
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("private bool " + this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
97014
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97211
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
97015
97212
|
});
|
|
97016
97213
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
97017
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97214
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
|
|
97018
97215
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
97019
97216
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
97020
97217
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("get");
|
|
@@ -97037,7 +97234,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceReturn__Lio_kait
|
|
|
97037
97234
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
97038
97235
|
});
|
|
97039
97236
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
97040
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, (((("(" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97237
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, (((("(" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType)) + ") (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ")"))
|
|
97041
97238
|
});
|
|
97042
97239
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.flagForInstName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
|
|
97043
97240
|
return ("f_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
|
|
@@ -97283,8 +97480,10 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.outImports__Lio_kaitai_stru
|
|
|
97283
97480
|
var this$2 = $n($n(this$1.Lio_kaitai_struct_ImportList__f_list).toList__sci_List());
|
|
97284
97481
|
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "\n", "\n")
|
|
97285
97482
|
});
|
|
97286
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.
|
|
97287
|
-
$
|
|
97483
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
97484
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_LuaCompiler__f_importList);
|
|
97485
|
+
var s = (("require(\"" + $n($n(extType).name__sci_List()).head__O()) + "\")");
|
|
97486
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
97288
97487
|
});
|
|
97289
97488
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
97290
97489
|
$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");
|
|
@@ -97394,7 +97593,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classConstructorHeader__sci
|
|
|
97394
97593
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).inc__V();
|
|
97395
97594
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("KaitaiStruct._init(self, io)");
|
|
97396
97595
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._parent = parent");
|
|
97397
|
-
|
|
97596
|
+
if (((name === null) ? (rootClassName === null) : $n(name).equals__O__Z(rootClassName))) {
|
|
97597
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._root = root or self")
|
|
97598
|
+
} else {
|
|
97599
|
+
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._root = root")
|
|
97600
|
+
};
|
|
97398
97601
|
if (isHybrid) {
|
|
97399
97602
|
$n(this.Lio_kaitai_struct_languages_LuaCompiler__f_out).puts__T__V("self._is_le = is_le")
|
|
97400
97603
|
};
|
|
@@ -98056,8 +98259,10 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classToString__Lio_kaitai_s
|
|
|
98056
98259
|
var this$3 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_out);
|
|
98057
98260
|
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
98058
98261
|
});
|
|
98059
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.
|
|
98060
|
-
$
|
|
98262
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
98263
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_importList);
|
|
98264
|
+
var s = $as_T($n($n(extType).name__sci_List()).head__O());
|
|
98265
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
98061
98266
|
});
|
|
98062
98267
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.innerEnums__Z = (function() {
|
|
98063
98268
|
return false
|
|
@@ -98099,10 +98304,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outImports__Lio_kaitai_stru
|
|
|
98099
98304
|
var this$4 = $n($$x1);
|
|
98100
98305
|
return ($f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", "\n", "") + "\n\n")
|
|
98101
98306
|
});
|
|
98102
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.importFile__T__V = (function(file) {
|
|
98103
|
-
var this$1 = $n(this.Lio_kaitai_struct_languages_NimCompiler__f_importList);
|
|
98104
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, file)
|
|
98105
|
-
});
|
|
98106
98307
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
98107
98308
|
$n(this.Lio_kaitai_struct_languages_NimCompiler__f_out).puts__T__V((("alignToByte(" + io) + ")"))
|
|
98108
98309
|
});
|
|
@@ -98882,36 +99083,15 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.indent__T = (function() {
|
|
|
98882
99083
|
});
|
|
98883
99084
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.outImports__Lio_kaitai_struct_format_ClassSpec__T = (function(topClass) {
|
|
98884
99085
|
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
98885
|
-
var this$
|
|
98886
|
-
|
|
98887
|
-
var x = $as_T(x$2);
|
|
98888
|
-
return (("require '" + x) + "'")
|
|
98889
|
-
});
|
|
98890
|
-
if ((this$3 === $m_sci_Nil$())) {
|
|
98891
|
-
var $$x1 = $m_sci_Nil$()
|
|
98892
|
-
} else {
|
|
98893
|
-
var arg1 = this$3.head__O();
|
|
98894
|
-
var h = new $c_sci_$colon$colon(f(arg1), $m_sci_Nil$());
|
|
98895
|
-
var t = h;
|
|
98896
|
-
var rest = $as_sci_List(this$3.tail__O());
|
|
98897
|
-
while ((rest !== $m_sci_Nil$())) {
|
|
98898
|
-
var arg1$1 = $n(rest).head__O();
|
|
98899
|
-
var nx = new $c_sci_$colon$colon(f(arg1$1), $m_sci_Nil$());
|
|
98900
|
-
$n(t).sci_$colon$colon__f_next = nx;
|
|
98901
|
-
t = nx;
|
|
98902
|
-
rest = $as_sci_List($n(rest).tail__O())
|
|
98903
|
-
};
|
|
98904
|
-
var $$x1 = h
|
|
98905
|
-
};
|
|
98906
|
-
var this$4 = $n($$x1);
|
|
98907
|
-
return ($f_sc_IterableOnceOps__mkString__T__T__T__T(this$4, "", "\n", "") + "\n")
|
|
99086
|
+
var this$2 = $n($n(this$1.Lio_kaitai_struct_ImportList__f_list).toList__sci_List());
|
|
99087
|
+
return $f_sc_IterableOnceOps__mkString__T__T__T__T(this$2, "", "\n", "\n")
|
|
98908
99088
|
});
|
|
98909
99089
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
98910
99090
|
$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");
|
|
98911
99091
|
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_outHeader);
|
|
98912
99092
|
$n(this$1.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
98913
99093
|
var this$2 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
98914
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "kaitai/struct/struct");
|
|
99094
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.Lio_kaitai_struct_ImportList__f_list, "require 'kaitai/struct/struct'");
|
|
98915
99095
|
var this$3 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out);
|
|
98916
99096
|
$n(this$3.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n");
|
|
98917
99097
|
$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) + "')"));
|
|
@@ -98922,6 +99102,14 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.fileHeader__T__V = (functi
|
|
|
98922
99102
|
var this$4 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out);
|
|
98923
99103
|
$n(this$4.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
98924
99104
|
});
|
|
99105
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
99106
|
+
if ($n(extType).isOpaque__Z()) {
|
|
99107
|
+
return (void 0)
|
|
99108
|
+
};
|
|
99109
|
+
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
99110
|
+
var s = (("require_relative '" + $n($n(extType).name__sci_List()).head__O()) + "'");
|
|
99111
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, s)
|
|
99112
|
+
});
|
|
98925
99113
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classHeader__T__V = (function(name) {
|
|
98926
99114
|
$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"));
|
|
98927
99115
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V();
|
|
@@ -98955,9 +99143,10 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorHeader__T_
|
|
|
98955
99143
|
var $$x1 = h
|
|
98956
99144
|
};
|
|
98957
99145
|
var paramsList = $n($$x2).join__sc_IterableOnce__T__T__T__T($$x1, ", ", ", ", "");
|
|
98958
|
-
|
|
99146
|
+
var pRootValue = ((name === rootClassName) ? "_root || self" : "_root");
|
|
99147
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((("def initialize(_io, _parent = nil, _root = nil" + endianSuffix) + paramsList) + ")"));
|
|
98959
99148
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).inc__V();
|
|
98960
|
-
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("super(_io, _parent,
|
|
99149
|
+
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V((("super(_io, _parent, " + pRootValue) + ")"));
|
|
98961
99150
|
if (isHybrid) {
|
|
98962
99151
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("@_is_le = _is_le")
|
|
98963
99152
|
};
|
|
@@ -99099,7 +99288,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrProcess__Lio_kaitai_st
|
|
|
99099
99288
|
var x = $m_Lio_kaitai_struct_format_ProcessZlib$();
|
|
99100
99289
|
if ((x === proc)) {
|
|
99101
99290
|
var this$1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_importList);
|
|
99102
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "zlib");
|
|
99291
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "require 'zlib'");
|
|
99103
99292
|
var expr$2 = (("Zlib::Inflate.inflate(" + srcExpr) + ")")
|
|
99104
99293
|
} else if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
|
|
99105
99294
|
var x4 = $as_Lio_kaitai_struct_format_ProcessRotate(proc);
|
|
@@ -99440,7 +99629,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sci
|
|
|
99440
99629
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99441
99630
|
var this$7 = $m_s_math_BigInt$();
|
|
99442
99631
|
var n = this$7.apply__J__s_math_BigInt(new $c_RTLong(lo, hi));
|
|
99443
|
-
$n($$x1).puts__T__V(((($n(n).toString__T() + " => ") +
|
|
99632
|
+
$n($$x1).puts__T__V(((($n(n).toString__T() + " => ") + $m_Lio_kaitai_struct_languages_RubyCompiler$().enumValue__T__T__T(enumName, label)) + ","))
|
|
99444
99633
|
} else {
|
|
99445
99634
|
throw new $c_s_MatchError(x0$1)
|
|
99446
99635
|
}
|
|
@@ -99449,13 +99638,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumDeclaration__T__T__sci
|
|
|
99449
99638
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V("}");
|
|
99450
99639
|
$n(this.Lio_kaitai_struct_languages_RubyCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_RubyCompiler$().inverseEnumName__T__T(enumConst) + " = ") + enumConst) + ".invert"))
|
|
99451
99640
|
});
|
|
99452
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumValue__T__T__T = (function(enumName, enumLabel) {
|
|
99453
|
-
var $$x1 = $n(this.Lio_kaitai_struct_languages_RubyCompiler__f_translator);
|
|
99454
|
-
$n($m_s_package$().s_package$__f_List);
|
|
99455
|
-
var array = [enumName];
|
|
99456
|
-
var elems = $ct_sjsr_WrappedVarArgs__sjs_js_Array__(new $c_sjsr_WrappedVarArgs(), array);
|
|
99457
|
-
return $n($$x1).doEnumByLabel__sci_List__T__T($m_sci_Nil$().prependedAll__sc_IterableOnce__sci_List(elems), enumLabel)
|
|
99458
|
-
});
|
|
99459
99641
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.debugClassSequence__sci_List__V = (function(seq) {
|
|
99460
99642
|
var this$2 = $n(seq);
|
|
99461
99643
|
var f = ((attr$2) => {
|
|
@@ -100242,9 +100424,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100242
100424
|
var this$3 = $n(params);
|
|
100243
100425
|
var f = ((p$2) => {
|
|
100244
100426
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
100245
|
-
var this$2 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100246
100427
|
var attrType = $n(p).Lio_kaitai_struct_format_ParamDefSpec__f_dataType;
|
|
100247
|
-
var
|
|
100428
|
+
var this$2 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100429
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100430
|
+
var $$x2 = this$2.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList);
|
|
100248
100431
|
var id = $n(p).Lio_kaitai_struct_format_ParamDefSpec__f_id;
|
|
100249
100432
|
return (($$x2 + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
100250
100433
|
});
|
|
@@ -100271,7 +100454,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100271
100454
|
var $$x6 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100272
100455
|
var $$x5 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
100273
100456
|
var this$5 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100274
|
-
$
|
|
100457
|
+
var importList$1 = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100458
|
+
$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) + ") {"));
|
|
100275
100459
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100276
100460
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("super(_io);");
|
|
100277
100461
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("this._parent = _parent;");
|
|
@@ -100314,7 +100498,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100314
100498
|
var $$x10 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100315
100499
|
var $$x9 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
100316
100500
|
var this$9 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100317
|
-
$
|
|
100501
|
+
var importList$2 = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100502
|
+
$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) + ") {"));
|
|
100318
100503
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100319
100504
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("this(_io, _parent, null" + paramsRelay) + ");"));
|
|
100320
100505
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).dec__V();
|
|
@@ -100324,7 +100509,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
100324
100509
|
var $$x12 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100325
100510
|
var $$x11 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
100326
100511
|
var this$11 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100327
|
-
$
|
|
100512
|
+
var importList$3 = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100513
|
+
$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) + ") {"));
|
|
100328
100514
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100329
100515
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("super(_io);");
|
|
100330
100516
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("this._parent = _parent;");
|
|
@@ -100388,10 +100574,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.readFooter__V = (function(
|
|
|
100388
100574
|
this.universalFooter__V()
|
|
100389
100575
|
});
|
|
100390
100576
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
100391
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
100577
|
+
$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)) + ";"))
|
|
100392
100578
|
});
|
|
100393
100579
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
100394
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
100580
|
+
$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)) + "; }"))
|
|
100395
100581
|
});
|
|
100396
100582
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
100397
100583
|
var this$1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
@@ -100592,9 +100778,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
100592
100778
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
100593
100779
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100594
100780
|
var $$x1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
100595
|
-
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100596
100781
|
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(dataType);
|
|
100597
|
-
|
|
100782
|
+
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100783
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100784
|
+
$n($$x2).puts__T__V(((($$x1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(attrType, importList)) + "();"))
|
|
100598
100785
|
});
|
|
100599
100786
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
100600
100787
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("{");
|
|
@@ -100629,7 +100816,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilHeader__Lio
|
|
|
100629
100816
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100630
100817
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100631
100818
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100632
|
-
|
|
100819
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100820
|
+
$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("_")) + ";"));
|
|
100633
100821
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("int i = 0;");
|
|
100634
100822
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("do {");
|
|
100635
100823
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
@@ -100665,7 +100853,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentSimple__Li
|
|
|
100665
100853
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
100666
100854
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100667
100855
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100668
|
-
|
|
100856
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100857
|
+
$n($$x1).puts__T__V((((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, importList) + " ") + id) + " = ") + expr) + ";"))
|
|
100669
100858
|
});
|
|
100670
100859
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.blockScopeHeader__V = (function() {
|
|
100671
100860
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("{");
|
|
@@ -100761,7 +100950,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
100761
100950
|
};
|
|
100762
100951
|
if ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType)))) {
|
|
100763
100952
|
var this$4 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100764
|
-
|
|
100953
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
100954
|
+
return (((("(" + this$4.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(assignType, importList)) + ") (") + expr) + ")")
|
|
100765
100955
|
} else {
|
|
100766
100956
|
return expr
|
|
100767
100957
|
}
|
|
@@ -100832,7 +101022,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.bytesPadTermExpr__T__s_Opt
|
|
|
100832
101022
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
100833
101023
|
if ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType)))) {
|
|
100834
101024
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100835
|
-
var
|
|
101025
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
101026
|
+
var expr = (((("((" + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, importList)) + ") (") + id) + "))")
|
|
100836
101027
|
} else {
|
|
100837
101028
|
var expr = id
|
|
100838
101029
|
};
|
|
@@ -100848,7 +101039,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesRender__Lio_kai
|
|
|
100848
101039
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100849
101040
|
var $$x1 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100850
101041
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100851
|
-
|
|
101042
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
101043
|
+
$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)) + ";"));
|
|
100852
101044
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("if (" + nameSwitchStr) + " != null) {"));
|
|
100853
101045
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100854
101046
|
$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);
|
|
@@ -100915,7 +101107,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfStart__Lio_kaitai_
|
|
|
100915
101107
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V();
|
|
100916
101108
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out);
|
|
100917
101109
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
100918
|
-
var
|
|
101110
|
+
var importList = this.Lio_kaitai_struct_languages_JavaCompiler__f_importList;
|
|
101111
|
+
var $$x1 = this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(onType, importList);
|
|
100919
101112
|
var e = this.Lio_kaitai_struct_languages_JavaCompiler__f_NAME_SWITCH_ON;
|
|
100920
101113
|
$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)) + ";"))
|
|
100921
101114
|
});
|
|
@@ -100944,10 +101137,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfEnd__V = (function
|
|
|
100944
101137
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V("}")
|
|
100945
101138
|
});
|
|
100946
101139
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
100947
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
101140
|
+
$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)) + ";"))
|
|
100948
101141
|
});
|
|
100949
101142
|
$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) {
|
|
100950
|
-
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
101143
|
+
$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)) + "() {"));
|
|
100951
101144
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).inc__V()
|
|
100952
101145
|
});
|
|
100953
101146
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
@@ -100960,8 +101153,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceReturn__Lio_kaitai
|
|
|
100960
101153
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
100961
101154
|
});
|
|
100962
101155
|
$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) {
|
|
100963
|
-
var primType = $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
100964
|
-
var boxedType = $m_Lio_kaitai_struct_languages_JavaCompiler$().
|
|
101156
|
+
var primType = $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_ImportList__T(dataType, this.Lio_kaitai_struct_languages_JavaCompiler__f_importList);
|
|
101157
|
+
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);
|
|
100965
101158
|
if ((primType !== boxedType)) {
|
|
100966
101159
|
$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)) + ");"));
|
|
100967
101160
|
$n(this.Lio_kaitai_struct_languages_JavaCompiler__f_out).puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName) + " = _tmp;"))
|
|
@@ -101168,7 +101361,7 @@ function $c_Lio_kaitai_struct_languages_PythonCompiler(typeProvider, config) {
|
|
|
101168
101361
|
this.Lio_kaitai_struct_languages_PythonCompiler__f_importList = null;
|
|
101169
101362
|
$ct_Lio_kaitai_struct_languages_components_LanguageCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__(this, typeProvider, config);
|
|
101170
101363
|
$f_Lio_kaitai_struct_languages_components_SingleOutputFile__$init$__V(this);
|
|
101171
|
-
this.Lio_kaitai_struct_languages_PythonCompiler__f_translator = $
|
|
101364
|
+
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)
|
|
101172
101365
|
}
|
|
101173
101366
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype = new $h_Lio_kaitai_struct_languages_components_LanguageCompiler();
|
|
101174
101367
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.constructor = $c_Lio_kaitai_struct_languages_PythonCompiler;
|
|
@@ -101298,13 +101491,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.fileHeader__T__V = (func
|
|
|
101298
101491
|
var this$8 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out);
|
|
101299
101492
|
$n(this$8.Lio_kaitai_struct_StringLanguageOutputWriter__f_sb).append__T__scm_StringBuilder("\n")
|
|
101300
101493
|
});
|
|
101301
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.
|
|
101302
|
-
|
|
101303
|
-
var $$x1 = $n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out);
|
|
101304
|
-
$m_sc_StringOps$();
|
|
101305
|
-
var x = $n(this.Lio_kaitai_struct_languages_components_LanguageCompiler__f_config).Lio_kaitai_struct_RuntimeConfig__f_pythonPackage;
|
|
101306
|
-
var this$3 = $n(x);
|
|
101307
|
-
$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)))
|
|
101494
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.externalTypeDeclaration__Lio_kaitai_struct_ExternalType__V = (function(extType) {
|
|
101495
|
+
$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)
|
|
101308
101496
|
});
|
|
101309
101497
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__T__V = (function(name) {
|
|
101310
101498
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(KaitaiStruct):"));
|
|
@@ -101340,7 +101528,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorHeader__
|
|
|
101340
101528
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).inc__V();
|
|
101341
101529
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._io = _io");
|
|
101342
101530
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._parent = _parent");
|
|
101343
|
-
|
|
101531
|
+
if ((name === rootClassName)) {
|
|
101532
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._root = _root if _root else self")
|
|
101533
|
+
} else {
|
|
101534
|
+
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._root = _root")
|
|
101535
|
+
};
|
|
101344
101536
|
if (isHybrid) {
|
|
101345
101537
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).puts__T__V("self._is_le = _is_le")
|
|
101346
101538
|
};
|
|
@@ -101754,7 +101946,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
101754
101946
|
};
|
|
101755
101947
|
var addArgs = (((", " + parent) + ", self._root") + addEndian)
|
|
101756
101948
|
};
|
|
101757
|
-
return (((((
|
|
101949
|
+
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) + ")")
|
|
101758
101950
|
} else {
|
|
101759
101951
|
throw new $c_s_MatchError(dataType)
|
|
101760
101952
|
}
|
|
@@ -101950,11 +102142,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrValidateExpr__Lio_ka
|
|
|
101950
102142
|
$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) + ")"));
|
|
101951
102143
|
$n(this.Lio_kaitai_struct_languages_PythonCompiler__f_out).dec__V()
|
|
101952
102144
|
});
|
|
101953
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.userType2class__Lio_kaitai_struct_datatype_DataType$UserType__T = (function(t) {
|
|
101954
|
-
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;
|
|
101955
|
-
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() + ".") : "");
|
|
101956
|
-
return (prefix + $m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__T(name))
|
|
101957
|
-
});
|
|
101958
102145
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
101959
102146
|
return this.Lio_kaitai_struct_languages_PythonCompiler__f_translator
|
|
101960
102147
|
});
|