kaitai-struct-compiler 0.10.0-SNAPSHOT20220728.93640.f88c6ed2 → 0.10.0-SNAPSHOT20220801.215207.be695f54
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 +338 -217
- package/package.json +1 -1
|
@@ -1290,6 +1290,16 @@ function $isArrayOf_Lio_kaitai_struct_exprlang_Ast$cmpop(obj, depth) {
|
|
|
1290
1290
|
function $asArrayOf_Lio_kaitai_struct_exprlang_Ast$cmpop(obj, depth) {
|
|
1291
1291
|
return (($isArrayOf_Lio_kaitai_struct_exprlang_Ast$cmpop(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.Ast$cmpop;", depth))
|
|
1292
1292
|
}
|
|
1293
|
+
function $f_Lio_kaitai_struct_exprlang_Ast$expr__evaluateStrConst__s_Option($thiz) {
|
|
1294
|
+
var x1 = $m_Lio_kaitai_struct_exprlang_ConstEvaluator$().evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value($thiz);
|
|
1295
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
1296
|
+
var x2 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(x1);
|
|
1297
|
+
var x = x2.value$1;
|
|
1298
|
+
return new $c_s_Some().init___O(x)
|
|
1299
|
+
} else {
|
|
1300
|
+
return $m_s_None$()
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1293
1303
|
function $is_Lio_kaitai_struct_exprlang_Ast$expr(obj) {
|
|
1294
1304
|
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_kaitai_struct_exprlang_Ast$expr)))
|
|
1295
1305
|
}
|
|
@@ -1579,6 +1589,81 @@ function $f_Lio_kaitai_struct_languages_components_CommonReads__attrValidateAll_
|
|
|
1579
1589
|
$f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_format_ValidationSpec__V(this$2, attrId, attr, valid)
|
|
1580
1590
|
}
|
|
1581
1591
|
}
|
|
1592
|
+
function $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List($thiz, id, ut, condSpec) {
|
|
1593
|
+
$m_sci_List$();
|
|
1594
|
+
var array = [new $c_Lio_kaitai_struct_format_AttrSpec().init___sci_List__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__s_Option__Lio_kaitai_struct_format_DocSpec($m_sci_Nil$(), new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id), ut.bytes$4, condSpec, ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_s_None$()), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_Lio_kaitai_struct_format_DocSpec$().EMPTY$1))];
|
|
1595
|
+
var i = (((-1) + $uI(array.length)) | 0);
|
|
1596
|
+
var result = $m_sci_Nil$();
|
|
1597
|
+
while ((i >= 0)) {
|
|
1598
|
+
var this$6 = result;
|
|
1599
|
+
var index = i;
|
|
1600
|
+
var x = array[index];
|
|
1601
|
+
result = new $c_sci_$colon$colon().init___O__sci_List(x, this$6);
|
|
1602
|
+
i = (((-1) + i) | 0)
|
|
1603
|
+
};
|
|
1604
|
+
return result
|
|
1605
|
+
}
|
|
1606
|
+
function $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraAttrsForAttribute__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__sc_Iterable($thiz, id, dataType, condSpec) {
|
|
1607
|
+
if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType)) {
|
|
1608
|
+
var x2 = $as_Lio_kaitai_struct_datatype_DataType$BytesType(dataType);
|
|
1609
|
+
var x1$2 = x2.process__s_Option();
|
|
1610
|
+
var x = $m_s_None$();
|
|
1611
|
+
if ((x === x1$2)) {
|
|
1612
|
+
return $m_sci_Nil$()
|
|
1613
|
+
} else if ((x1$2 instanceof $c_s_Some)) {
|
|
1614
|
+
var rawId = new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id);
|
|
1615
|
+
$m_sci_List$();
|
|
1616
|
+
var array = [new $c_Lio_kaitai_struct_format_AttrSpec().init___sci_List__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__s_Option__Lio_kaitai_struct_format_DocSpec($m_sci_Nil$(), rawId, x2, condSpec, ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_s_None$()), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_Lio_kaitai_struct_format_DocSpec$().EMPTY$1))];
|
|
1617
|
+
var i = (((-1) + $uI(array.length)) | 0);
|
|
1618
|
+
var result = $m_sci_Nil$();
|
|
1619
|
+
while ((i >= 0)) {
|
|
1620
|
+
var this$6 = result;
|
|
1621
|
+
var index = i;
|
|
1622
|
+
var x$1 = array[index];
|
|
1623
|
+
result = new $c_sci_$colon$colon().init___O__sci_List(x$1, this$6);
|
|
1624
|
+
i = (((-1) + i) | 0)
|
|
1625
|
+
};
|
|
1626
|
+
var jsx$2 = result;
|
|
1627
|
+
var jsx$1 = $thiz.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List(id, condSpec.repeat$1);
|
|
1628
|
+
var this$7 = $m_sci_List$();
|
|
1629
|
+
return $as_sc_Iterable(jsx$2.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(jsx$1, this$7.ReusableCBFInstance$2))
|
|
1630
|
+
} else {
|
|
1631
|
+
throw new $c_s_MatchError().init___O(x1$2)
|
|
1632
|
+
}
|
|
1633
|
+
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
|
|
1634
|
+
var x3 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(dataType);
|
|
1635
|
+
var rawId$2 = new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id);
|
|
1636
|
+
var jsx$6 = $thiz.extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List(id, x3, condSpec);
|
|
1637
|
+
var jsx$5 = $thiz.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List(rawId$2, condSpec.repeat$1);
|
|
1638
|
+
var this$8 = $m_sci_List$();
|
|
1639
|
+
var jsx$4 = $as_sci_List(jsx$6.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(jsx$5, this$8.ReusableCBFInstance$2));
|
|
1640
|
+
var dataType$1 = x3.bytes$4;
|
|
1641
|
+
var jsx$3 = $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraAttrsForAttribute__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__sc_Iterable($thiz, rawId$2, dataType$1, condSpec);
|
|
1642
|
+
var this$9 = $m_sci_List$();
|
|
1643
|
+
var this$10 = $as_sci_List(jsx$4.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(jsx$3, this$9.ReusableCBFInstance$2));
|
|
1644
|
+
return $as_sc_Iterable($f_sc_SeqLike__distinct__O(this$10))
|
|
1645
|
+
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
1646
|
+
var x4 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(dataType);
|
|
1647
|
+
var this$12 = x4.cases$2;
|
|
1648
|
+
var f = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this, id$1, condSpec$1) {
|
|
1649
|
+
return (function(x0$1$2) {
|
|
1650
|
+
var x0$1 = $as_T2(x0$1$2);
|
|
1651
|
+
if ((x0$1 !== null)) {
|
|
1652
|
+
var caseType = $as_Lio_kaitai_struct_datatype_DataType(x0$1.$$und2__O());
|
|
1653
|
+
return $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraAttrsForAttribute__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__sc_Iterable($this, id$1, caseType, condSpec$1)
|
|
1654
|
+
} else {
|
|
1655
|
+
throw new $c_s_MatchError().init___O(x0$1)
|
|
1656
|
+
}
|
|
1657
|
+
})
|
|
1658
|
+
})($thiz, id, condSpec));
|
|
1659
|
+
var this$11 = $m_sci_Iterable$();
|
|
1660
|
+
var bf = this$11.ReusableCBFInstance$2;
|
|
1661
|
+
var this$13 = $as_sc_TraversableOnce($f_sc_TraversableLike__flatMap__F1__scg_CanBuildFrom__O(this$12, f, bf)).toList__sci_List();
|
|
1662
|
+
return $as_sc_Iterable($f_sc_SeqLike__distinct__O(this$13))
|
|
1663
|
+
} else {
|
|
1664
|
+
return $m_sci_Nil$()
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1582
1667
|
function $is_Lio_kaitai_struct_languages_components_LanguageCompilerStatic(obj) {
|
|
1583
1668
|
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_kaitai_struct_languages_components_LanguageCompilerStatic)))
|
|
1584
1669
|
}
|
|
@@ -1606,16 +1691,15 @@ function $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expre
|
|
|
1606
1691
|
return $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).translator__Lio_kaitai_struct_translators_AbstractTranslator().translate__Lio_kaitai_struct_exprlang_Ast$expr__T(e)
|
|
1607
1692
|
}
|
|
1608
1693
|
function $f_Lio_kaitai_struct_languages_components_SingleOutputFile__results__Lio_kaitai_struct_format_ClassSpec__sci_Map($thiz, topClass) {
|
|
1609
|
-
var jsx$1 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
|
|
1610
1694
|
var this$1 = topClass.name$1;
|
|
1611
|
-
var self =
|
|
1695
|
+
var self = $thiz.outFileName__T__T($f_sc_TraversableOnce__mkString__T__T__T__T(this$1, "", "::", ""));
|
|
1612
1696
|
var this$3 = $thiz.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter();
|
|
1613
1697
|
var this$4 = this$3.sb$2;
|
|
1614
|
-
var jsx$
|
|
1615
|
-
var jsx$
|
|
1698
|
+
var jsx$2 = this$4.underlying$5.java$lang$StringBuilder$$content$f;
|
|
1699
|
+
var jsx$1 = $thiz.outImports__Lio_kaitai_struct_format_ClassSpec__T(topClass);
|
|
1616
1700
|
var this$5 = $thiz.out__Lio_kaitai_struct_StringLanguageOutputWriter();
|
|
1617
1701
|
var this$6 = this$5.sb$2;
|
|
1618
|
-
var y = ((("" + jsx$
|
|
1702
|
+
var y = ((("" + jsx$2) + jsx$1) + this$6.underlying$5.java$lang$StringBuilder$$content$f);
|
|
1619
1703
|
var array = [new $c_T2().init___O__O(self, y)];
|
|
1620
1704
|
var this$11 = new $c_scm_MapBuilder().init___sc_GenMap($m_sci_Map$EmptyMap$());
|
|
1621
1705
|
var i = 0;
|
|
@@ -3596,6 +3680,47 @@ $h_Lio_kaitai_struct_Main$.prototype = $c_Lio_kaitai_struct_Main$.prototype;
|
|
|
3596
3680
|
$c_Lio_kaitai_struct_Main$.prototype.init___ = (function() {
|
|
3597
3681
|
return this
|
|
3598
3682
|
});
|
|
3683
|
+
$c_Lio_kaitai_struct_Main$.prototype.updateConfigFromMeta__p1__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_RuntimeConfig = (function(config, meta) {
|
|
3684
|
+
if (meta.forceDebug$1) {
|
|
3685
|
+
var opaqueTypes = config.opaqueTypes$1;
|
|
3686
|
+
var zeroCopySubstream = config.zeroCopySubstream$1;
|
|
3687
|
+
var cppConfig = config.cppConfig$1;
|
|
3688
|
+
var goPackage = config.goPackage$1;
|
|
3689
|
+
var java = config.java$1;
|
|
3690
|
+
var dotNetNamespace = config.dotNetNamespace$1;
|
|
3691
|
+
var phpNamespace = config.phpNamespace$1;
|
|
3692
|
+
var pythonPackage = config.pythonPackage$1;
|
|
3693
|
+
var nimModule = config.nimModule$1;
|
|
3694
|
+
var nimOpaque = config.nimOpaque$1;
|
|
3695
|
+
var config1 = new $c_Lio_kaitai_struct_RuntimeConfig().init___Z__Z__Z__Z__Lio_kaitai_struct_CppRuntimeConfig__T__Lio_kaitai_struct_JavaRuntimeConfig__T__T__T__T__T(false, true, opaqueTypes, zeroCopySubstream, cppConfig, goPackage, java, dotNetNamespace, phpNamespace, pythonPackage, nimModule, nimOpaque)
|
|
3696
|
+
} else {
|
|
3697
|
+
var config1 = config
|
|
3698
|
+
};
|
|
3699
|
+
var x1 = meta.zeroCopySubstream$1;
|
|
3700
|
+
if ((x1 instanceof $c_s_Some)) {
|
|
3701
|
+
var x2 = $as_s_Some(x1);
|
|
3702
|
+
var value = $uZ(x2.value$2);
|
|
3703
|
+
var x$2 = config1.autoRead$1;
|
|
3704
|
+
var x$3 = config1.readStoresPos$1;
|
|
3705
|
+
var x$4 = config1.opaqueTypes$1;
|
|
3706
|
+
var x$5 = config1.cppConfig$1;
|
|
3707
|
+
var x$6 = config1.goPackage$1;
|
|
3708
|
+
var x$7 = config1.java$1;
|
|
3709
|
+
var x$8 = config1.dotNetNamespace$1;
|
|
3710
|
+
var x$9 = config1.phpNamespace$1;
|
|
3711
|
+
var x$10 = config1.pythonPackage$1;
|
|
3712
|
+
var x$11 = config1.nimModule$1;
|
|
3713
|
+
var x$12 = config1.nimOpaque$1;
|
|
3714
|
+
var config2 = new $c_Lio_kaitai_struct_RuntimeConfig().init___Z__Z__Z__Z__Lio_kaitai_struct_CppRuntimeConfig__T__Lio_kaitai_struct_JavaRuntimeConfig__T__T__T__T__T(x$2, x$3, x$4, value, x$5, x$6, x$7, x$8, x$9, x$10, x$11, x$12)
|
|
3715
|
+
} else {
|
|
3716
|
+
var x = $m_s_None$();
|
|
3717
|
+
if ((!(x === x1))) {
|
|
3718
|
+
throw new $c_s_MatchError().init___O(x1)
|
|
3719
|
+
};
|
|
3720
|
+
var config2 = config1
|
|
3721
|
+
};
|
|
3722
|
+
return config2
|
|
3723
|
+
});
|
|
3599
3724
|
$c_Lio_kaitai_struct_Main$.prototype.importAndPrecompile__Lio_kaitai_struct_format_ClassSpecs__Lio_kaitai_struct_RuntimeConfig__s_concurrent_Future = (function(specs, config) {
|
|
3600
3725
|
return new $c_Lio_kaitai_struct_precompile_LoadImports().init___Lio_kaitai_struct_format_ClassSpecs(specs).processClass__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_precompile_LoadImports$ImportPath__s_concurrent_Future(specs.firstSpec$6, $m_Lio_kaitai_struct_precompile_LoadImports$().BasePath$1).map__F1__s_concurrent_ExecutionContext__s_concurrent_Future(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this, specs$1, config$1) {
|
|
3601
3726
|
return (function(allSpecs$2) {
|
|
@@ -3635,22 +3760,6 @@ $c_Lio_kaitai_struct_Main$.prototype.precompile__Lio_kaitai_struct_format_ClassS
|
|
|
3635
3760
|
var this$3 = $m_sc_Iterable$();
|
|
3636
3761
|
return $as_sc_Iterable(typeValidatorProblems.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(styleWarnings, this$3.ReusableCBFInstance$2))
|
|
3637
3762
|
});
|
|
3638
|
-
$c_Lio_kaitai_struct_Main$.prototype.updateConfig__p1__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_RuntimeConfig = (function(config, topClass) {
|
|
3639
|
-
if (topClass.meta$1.forceDebug$1) {
|
|
3640
|
-
var opaqueTypes = config.opaqueTypes$1;
|
|
3641
|
-
var cppConfig = config.cppConfig$1;
|
|
3642
|
-
var goPackage = config.goPackage$1;
|
|
3643
|
-
var java = config.java$1;
|
|
3644
|
-
var dotNetNamespace = config.dotNetNamespace$1;
|
|
3645
|
-
var phpNamespace = config.phpNamespace$1;
|
|
3646
|
-
var pythonPackage = config.pythonPackage$1;
|
|
3647
|
-
var nimModule = config.nimModule$1;
|
|
3648
|
-
var nimOpaque = config.nimOpaque$1;
|
|
3649
|
-
return new $c_Lio_kaitai_struct_RuntimeConfig().init___Z__Z__Z__Lio_kaitai_struct_CppRuntimeConfig__T__Lio_kaitai_struct_JavaRuntimeConfig__T__T__T__T__T(false, true, opaqueTypes, cppConfig, goPackage, java, dotNetNamespace, phpNamespace, pythonPackage, nimModule, nimOpaque)
|
|
3650
|
-
} else {
|
|
3651
|
-
return config
|
|
3652
|
-
}
|
|
3653
|
-
});
|
|
3654
3763
|
$c_Lio_kaitai_struct_Main$.prototype.precompile__Lio_kaitai_struct_format_ClassSpecs__Lio_kaitai_struct_RuntimeConfig__sc_Iterable = (function(specs, config) {
|
|
3655
3764
|
$m_scm_Iterable$();
|
|
3656
3765
|
$m_scm_Iterable$();
|
|
@@ -3676,7 +3785,7 @@ $c_Lio_kaitai_struct_Main$.prototype.precompile__Lio_kaitai_struct_format_ClassS
|
|
|
3676
3785
|
return b
|
|
3677
3786
|
});
|
|
3678
3787
|
$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) {
|
|
3679
|
-
var config = this.
|
|
3788
|
+
var config = this.updateConfigFromMeta__p1__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_RuntimeConfig(conf, spec.meta$1);
|
|
3680
3789
|
var x = $m_Lio_kaitai_struct_GraphvizClassCompiler$();
|
|
3681
3790
|
if ((x === lang)) {
|
|
3682
3791
|
var cc = new $c_Lio_kaitai_struct_GraphvizClassCompiler().init___Lio_kaitai_struct_format_ClassSpecs__Lio_kaitai_struct_format_ClassSpec(specs, spec)
|
|
@@ -3790,7 +3899,7 @@ $c_Lio_kaitai_struct_MainJs$.prototype.$$js$exported$prop$buildDate__O = (functi
|
|
|
3790
3899
|
});
|
|
3791
3900
|
$c_Lio_kaitai_struct_MainJs$.prototype.compile__T__sjs_js_Object__Lio_kaitai_struct_JavaScriptImporter__Z__sjs_js_Promise = (function(langStr, yaml, importer, debug) {
|
|
3792
3901
|
try {
|
|
3793
|
-
var config = new $c_Lio_kaitai_struct_RuntimeConfig().
|
|
3902
|
+
var config = new $c_Lio_kaitai_struct_RuntimeConfig().init___Z__Z__Z__Z__Lio_kaitai_struct_CppRuntimeConfig__T__Lio_kaitai_struct_JavaRuntimeConfig__T__T__T__T__T((!debug), debug, false, true, new $c_Lio_kaitai_struct_CppRuntimeConfig().init___sci_List__Z__Z__Z__Lio_kaitai_struct_CppRuntimeConfig$Pointers($m_sci_Nil$(), false, false, false, $m_Lio_kaitai_struct_CppRuntimeConfig$RawPointers$()), "", new $c_Lio_kaitai_struct_JavaRuntimeConfig().init___T__T__T("", "io.kaitai.struct.ByteBufferKaitaiStream", "java.nio.BufferUnderflowException"), "Kaitai", "", "", "kaitai_struct_nim_runtime", "");
|
|
3794
3903
|
var this$5 = $m_Lio_kaitai_struct_languages_components_LanguageCompilerStatic$();
|
|
3795
3904
|
var lang = $as_Lio_kaitai_struct_languages_components_LanguageCompilerStatic(this$5.NAME$undTO$undCLASS$1.apply__O__O(langStr));
|
|
3796
3905
|
var jsx$2 = $m_sjs_js_JSConverters$JSRichFuture$();
|
|
@@ -4395,9 +4504,9 @@ function $h_Lio_kaitai_struct_Version$() {
|
|
|
4395
4504
|
$h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
|
|
4396
4505
|
$c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
|
|
4397
4506
|
this.name$1 = "kaitai-struct-compiler-js";
|
|
4398
|
-
this.version$1 = "0.10-
|
|
4399
|
-
this.gitCommit$1 = "
|
|
4400
|
-
this.gitTime$1 = "2022-
|
|
4507
|
+
this.version$1 = "0.10-SNAPSHOT20220801.215207.be695f54";
|
|
4508
|
+
this.gitCommit$1 = "be695f54";
|
|
4509
|
+
this.gitTime$1 = "2022-08-01T21:52:07+00:00";
|
|
4401
4510
|
return this
|
|
4402
4511
|
});
|
|
4403
4512
|
var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
|
|
@@ -8995,84 +9104,15 @@ $c_Lio_kaitai_struct_languages_components_ExtraAttrs$.prototype.forClassSpec__Li
|
|
|
8995
9104
|
return (function(attrs$2, attr$2) {
|
|
8996
9105
|
var attrs = $as_sci_List(attrs$2);
|
|
8997
9106
|
var attr = $as_Lio_kaitai_struct_format_AttrLikeSpec(attr$2);
|
|
8998
|
-
var
|
|
8999
|
-
var
|
|
9107
|
+
var id = attr.id__Lio_kaitai_struct_format_Identifier();
|
|
9108
|
+
var dataType = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
9109
|
+
var condSpec = attr.cond__Lio_kaitai_struct_format_ConditionalSpec();
|
|
9110
|
+
var jsx$4 = $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraAttrsForAttribute__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__sc_Iterable(compiler$1, id, dataType, condSpec);
|
|
9000
9111
|
var this$4 = $m_sci_List$();
|
|
9001
9112
|
return $as_sci_List(attrs.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(jsx$4, this$4.ReusableCBFInstance$2))
|
|
9002
9113
|
})
|
|
9003
9114
|
})(this, compiler))))
|
|
9004
9115
|
});
|
|
9005
|
-
$c_Lio_kaitai_struct_languages_components_ExtraAttrs$.prototype.forAttr__p1__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__Lio_kaitai_struct_languages_components_ExtraAttrs__sc_Iterable = (function(id, dataType, condSpec, compiler) {
|
|
9006
|
-
if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType)) {
|
|
9007
|
-
var x2 = $as_Lio_kaitai_struct_datatype_DataType$BytesType(dataType);
|
|
9008
|
-
var x1$2 = x2.process__s_Option();
|
|
9009
|
-
var x = $m_s_None$();
|
|
9010
|
-
if ((x === x1$2)) {
|
|
9011
|
-
return $m_sci_Nil$()
|
|
9012
|
-
} else if ((x1$2 instanceof $c_s_Some)) {
|
|
9013
|
-
var rawId = new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id);
|
|
9014
|
-
$m_sci_List$();
|
|
9015
|
-
var array = [new $c_Lio_kaitai_struct_format_AttrSpec().init___sci_List__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__s_Option__Lio_kaitai_struct_format_DocSpec($m_sci_Nil$(), rawId, x2, condSpec, ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_s_None$()), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_Lio_kaitai_struct_format_DocSpec$().EMPTY$1))];
|
|
9016
|
-
var i = (((-1) + $uI(array.length)) | 0);
|
|
9017
|
-
var result = $m_sci_Nil$();
|
|
9018
|
-
while ((i >= 0)) {
|
|
9019
|
-
var this$6 = result;
|
|
9020
|
-
var index = i;
|
|
9021
|
-
var x$1 = array[index];
|
|
9022
|
-
result = new $c_sci_$colon$colon().init___O__sci_List(x$1, this$6);
|
|
9023
|
-
i = (((-1) + i) | 0)
|
|
9024
|
-
};
|
|
9025
|
-
var jsx$2 = result;
|
|
9026
|
-
var jsx$1 = compiler.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List(id, condSpec.repeat$1);
|
|
9027
|
-
var this$7 = $m_sci_List$();
|
|
9028
|
-
return $as_sc_Iterable(jsx$2.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(jsx$1, this$7.ReusableCBFInstance$2))
|
|
9029
|
-
} else {
|
|
9030
|
-
throw new $c_s_MatchError().init___O(x1$2)
|
|
9031
|
-
}
|
|
9032
|
-
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
|
|
9033
|
-
var x3 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(dataType);
|
|
9034
|
-
var rawId$2 = new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id);
|
|
9035
|
-
$m_sci_List$();
|
|
9036
|
-
var array$1 = [new $c_Lio_kaitai_struct_format_AttrSpec().init___sci_List__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__s_Option__Lio_kaitai_struct_format_DocSpec($m_sci_Nil$(), rawId$2, x3.bytes$4, condSpec, ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_s_None$()), ($m_Lio_kaitai_struct_format_AttrSpec$(), $m_Lio_kaitai_struct_format_DocSpec$().EMPTY$1))];
|
|
9037
|
-
var i$1 = (((-1) + $uI(array$1.length)) | 0);
|
|
9038
|
-
var result$1 = $m_sci_Nil$();
|
|
9039
|
-
while ((i$1 >= 0)) {
|
|
9040
|
-
var this$13 = result$1;
|
|
9041
|
-
var index$1 = i$1;
|
|
9042
|
-
var x$2 = array$1[index$1];
|
|
9043
|
-
result$1 = new $c_sci_$colon$colon().init___O__sci_List(x$2, this$13);
|
|
9044
|
-
i$1 = (((-1) + i$1) | 0)
|
|
9045
|
-
};
|
|
9046
|
-
var jsx$6 = result$1;
|
|
9047
|
-
var jsx$5 = compiler.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List(rawId$2, condSpec.repeat$1);
|
|
9048
|
-
var this$14 = $m_sci_List$();
|
|
9049
|
-
var jsx$4 = $as_sci_List(jsx$6.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(jsx$5, this$14.ReusableCBFInstance$2));
|
|
9050
|
-
var jsx$3 = this.forAttr__p1__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__Lio_kaitai_struct_languages_components_ExtraAttrs__sc_Iterable(rawId$2, x3.bytes$4, condSpec, compiler);
|
|
9051
|
-
var this$15 = $m_sci_List$();
|
|
9052
|
-
var this$16 = $as_sci_List(jsx$4.$$plus$plus__sc_GenTraversableOnce__scg_CanBuildFrom__O(jsx$3, this$15.ReusableCBFInstance$2));
|
|
9053
|
-
return $as_sc_Iterable($f_sc_SeqLike__distinct__O(this$16))
|
|
9054
|
-
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
9055
|
-
var x4 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(dataType);
|
|
9056
|
-
var this$18 = x4.cases$2;
|
|
9057
|
-
var f = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this, id$1, condSpec$1, compiler$1) {
|
|
9058
|
-
return (function(x0$1$2) {
|
|
9059
|
-
var x0$1 = $as_T2(x0$1$2);
|
|
9060
|
-
if ((x0$1 !== null)) {
|
|
9061
|
-
var caseType = $as_Lio_kaitai_struct_datatype_DataType(x0$1.$$und2__O());
|
|
9062
|
-
return $m_Lio_kaitai_struct_languages_components_ExtraAttrs$().forAttr__p1__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__Lio_kaitai_struct_languages_components_ExtraAttrs__sc_Iterable(id$1, caseType, condSpec$1, compiler$1)
|
|
9063
|
-
} else {
|
|
9064
|
-
throw new $c_s_MatchError().init___O(x0$1)
|
|
9065
|
-
}
|
|
9066
|
-
})
|
|
9067
|
-
})(this, id, condSpec, compiler));
|
|
9068
|
-
var this$17 = $m_sci_Iterable$();
|
|
9069
|
-
var bf = this$17.ReusableCBFInstance$2;
|
|
9070
|
-
var this$19 = $as_sc_TraversableOnce($f_sc_TraversableLike__flatMap__F1__scg_CanBuildFrom__O(this$18, f, bf)).toList__sci_List();
|
|
9071
|
-
return $as_sc_Iterable($f_sc_SeqLike__distinct__O(this$19))
|
|
9072
|
-
} else {
|
|
9073
|
-
return $m_sci_Nil$()
|
|
9074
|
-
}
|
|
9075
|
-
});
|
|
9076
9116
|
var $d_Lio_kaitai_struct_languages_components_ExtraAttrs$ = new $TypeData().initClass({
|
|
9077
9117
|
Lio_kaitai_struct_languages_components_ExtraAttrs$: 0
|
|
9078
9118
|
}, false, "io.kaitai.struct.languages.components.ExtraAttrs$", {
|
|
@@ -20195,9 +20235,11 @@ $c_Lio_kaitai_struct_ClassCompiler.prototype.compileCalcEndian__Lio_kaitai_struc
|
|
|
20195
20235
|
})(this)))
|
|
20196
20236
|
});
|
|
20197
20237
|
$c_Lio_kaitai_struct_ClassCompiler.prototype.compileAttrInit__Lio_kaitai_struct_format_AttrLikeSpec__V = (function(originalAttr) {
|
|
20198
|
-
var this$1 = $m_Lio_kaitai_struct_languages_components_ExtraAttrs$();
|
|
20199
20238
|
var compiler = this.lang$1;
|
|
20200
|
-
var
|
|
20239
|
+
var id = originalAttr.id__Lio_kaitai_struct_format_Identifier();
|
|
20240
|
+
var dataType = originalAttr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
20241
|
+
var condSpec = originalAttr.cond__Lio_kaitai_struct_format_ConditionalSpec();
|
|
20242
|
+
var extraAttrs = $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraAttrsForAttribute__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_format_ConditionalSpec__sc_Iterable(compiler, id, dataType, condSpec);
|
|
20201
20243
|
$m_sci_List$();
|
|
20202
20244
|
var array = [originalAttr];
|
|
20203
20245
|
var i = (((-1) + $uI(array.length)) | 0);
|
|
@@ -28772,9 +28814,9 @@ function $h_Lio_kaitai_struct_format_MetaSpec$() {
|
|
|
28772
28814
|
$h_Lio_kaitai_struct_format_MetaSpec$.prototype = $c_Lio_kaitai_struct_format_MetaSpec$.prototype;
|
|
28773
28815
|
$c_Lio_kaitai_struct_format_MetaSpec$.prototype.init___ = (function() {
|
|
28774
28816
|
$n_Lio_kaitai_struct_format_MetaSpec$ = this;
|
|
28775
|
-
this.OPAQUE$1 = new $c_Lio_kaitai_struct_format_MetaSpec().
|
|
28817
|
+
this.OPAQUE$1 = new $c_Lio_kaitai_struct_format_MetaSpec().init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List($m_sci_Nil$(), true, $m_s_None$(), $m_s_None$(), $m_s_None$(), $m_s_None$(), false, $m_s_None$(), $m_s_None$(), $m_sci_Nil$());
|
|
28776
28818
|
var jsx$1 = $m_s_Predef$().Set$2;
|
|
28777
|
-
var array = ["id", "imports", "endian", "bit-endian", "encoding", "title", "ks-version", "ks-debug", "ks-opaque-types", "license", "file-extension", "xref", "tags", "application"];
|
|
28819
|
+
var array = ["id", "imports", "endian", "bit-endian", "encoding", "title", "ks-version", "ks-debug", "ks-opaque-types", "ks-zero-copy-substream", "license", "file-extension", "xref", "tags", "application"];
|
|
28778
28820
|
this.LEGAL$undKEYS$1 = $as_sci_Set(jsx$1.apply__sc_Seq__sc_GenTraversable(new $c_sjs_js_WrappedArray().init___sjs_js_Array(array)));
|
|
28779
28821
|
return this
|
|
28780
28822
|
});
|
|
@@ -28820,8 +28862,9 @@ $c_Lio_kaitai_struct_format_MetaSpec$.prototype.fromYaml__O__sci_List__Lio_kaita
|
|
|
28820
28862
|
var this$10 = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "ks-debug", path);
|
|
28821
28863
|
var forceDebug = $uZ((this$10.isEmpty__Z() ? false : this$10.get__O()));
|
|
28822
28864
|
var opaqueTypes = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "ks-opaque-types", path);
|
|
28865
|
+
var zeroCopySubstream = $m_Lio_kaitai_struct_format_ParseUtils$().getOptValueBool__sci_Map__T__sci_List__s_Option(srcMap, "ks-zero-copy-substream", path);
|
|
28823
28866
|
var imports = $m_Lio_kaitai_struct_format_ParseUtils$().getListStr__sci_Map__T__sci_List__sci_List(srcMap, "imports", path);
|
|
28824
|
-
return new $c_Lio_kaitai_struct_format_MetaSpec().
|
|
28867
|
+
return new $c_Lio_kaitai_struct_format_MetaSpec().init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List(path, false, id, endian, bitEndian, encoding, forceDebug, opaqueTypes, zeroCopySubstream, imports)
|
|
28825
28868
|
});
|
|
28826
28869
|
$c_Lio_kaitai_struct_format_MetaSpec$.prototype.emptyWithPath__sci_List__Lio_kaitai_struct_format_MetaSpec = (function(path) {
|
|
28827
28870
|
var this$1 = this.OPAQUE$1;
|
|
@@ -28837,8 +28880,10 @@ $c_Lio_kaitai_struct_format_MetaSpec$.prototype.emptyWithPath__sci_List__Lio_kai
|
|
|
28837
28880
|
var this$6 = this.OPAQUE$1;
|
|
28838
28881
|
var x$8 = this$6.opaqueTypes$1;
|
|
28839
28882
|
var this$7 = this.OPAQUE$1;
|
|
28840
|
-
var x$9 = this$7.
|
|
28841
|
-
|
|
28883
|
+
var x$9 = this$7.zeroCopySubstream$1;
|
|
28884
|
+
var this$8 = this.OPAQUE$1;
|
|
28885
|
+
var x$10 = this$8.imports$1;
|
|
28886
|
+
return new $c_Lio_kaitai_struct_format_MetaSpec().init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List(path, false, x$3, x$4, x$5, x$6, x$7, x$8, x$9, x$10)
|
|
28842
28887
|
});
|
|
28843
28888
|
var $d_Lio_kaitai_struct_format_MetaSpec$ = new $TypeData().initClass({
|
|
28844
28889
|
Lio_kaitai_struct_format_MetaSpec$: 0
|
|
@@ -29539,29 +29584,33 @@ function $m_Lio_kaitai_struct_languages_CppCompiler$() {
|
|
|
29539
29584
|
return $n_Lio_kaitai_struct_languages_CppCompiler$
|
|
29540
29585
|
}
|
|
29541
29586
|
function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstream__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T($thiz, id, byteType, io, rep, defEndian) {
|
|
29542
|
-
if ((
|
|
29543
|
-
|
|
29544
|
-
|
|
29545
|
-
|
|
29546
|
-
|
|
29547
|
-
|
|
29548
|
-
|
|
29549
|
-
|
|
29550
|
-
|
|
29551
|
-
|
|
29552
|
-
|
|
29553
|
-
|
|
29587
|
+
if ($as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).config$1.zeroCopySubstream$1) {
|
|
29588
|
+
if ((byteType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesLimitType)) {
|
|
29589
|
+
var x2 = $as_Lio_kaitai_struct_datatype_DataType$BytesLimitType(byteType);
|
|
29590
|
+
var sizeExpr = x2.size$2;
|
|
29591
|
+
var p3 = x2.terminator$2;
|
|
29592
|
+
var p5 = x2.padRight$2;
|
|
29593
|
+
var p6 = x2.process$2;
|
|
29594
|
+
var x = $m_s_None$();
|
|
29595
|
+
if ((x === p3)) {
|
|
29596
|
+
var x$3 = $m_s_None$();
|
|
29597
|
+
if ((x$3 === p5)) {
|
|
29598
|
+
var x$5 = $m_s_None$();
|
|
29599
|
+
var jsx$1 = (x$5 === p6)
|
|
29600
|
+
} else {
|
|
29601
|
+
var jsx$1 = false
|
|
29602
|
+
}
|
|
29554
29603
|
} else {
|
|
29555
29604
|
var jsx$1 = false
|
|
29605
|
+
};
|
|
29606
|
+
if (jsx$1) {
|
|
29607
|
+
return $thiz.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(id, sizeExpr, io)
|
|
29556
29608
|
}
|
|
29557
|
-
} else {
|
|
29558
|
-
var jsx$1 = false
|
|
29559
29609
|
};
|
|
29560
|
-
|
|
29561
|
-
|
|
29562
|
-
|
|
29563
|
-
}
|
|
29564
|
-
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamBuffered__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T($thiz, id, byteType, io, rep, defEndian)
|
|
29610
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamBuffered__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T($thiz, id, byteType, io, rep, defEndian)
|
|
29611
|
+
} else {
|
|
29612
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamBuffered__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__T($thiz, id, byteType, io, rep, defEndian)
|
|
29613
|
+
}
|
|
29565
29614
|
}
|
|
29566
29615
|
function $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) {
|
|
29567
29616
|
var x = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
@@ -33953,6 +34002,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.idToStr__Lio_kaitai_struc
|
|
|
33953
34002
|
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
33954
34003
|
var innerId = x6.innerId$2;
|
|
33955
34004
|
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
34005
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_IoStorageIdentifier)) {
|
|
34006
|
+
var x7 = $as_Lio_kaitai_struct_format_IoStorageIdentifier(id);
|
|
34007
|
+
var innerId$2 = x7.innerId$2;
|
|
34008
|
+
return ("_io_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId$2))
|
|
33956
34009
|
} else {
|
|
33957
34010
|
throw new $c_s_MatchError().init___O(id)
|
|
33958
34011
|
}
|
|
@@ -39474,6 +39527,7 @@ function $c_Lio_kaitai_struct_RuntimeConfig() {
|
|
|
39474
39527
|
this.autoRead$1 = false;
|
|
39475
39528
|
this.readStoresPos$1 = false;
|
|
39476
39529
|
this.opaqueTypes$1 = false;
|
|
39530
|
+
this.zeroCopySubstream$1 = false;
|
|
39477
39531
|
this.cppConfig$1 = null;
|
|
39478
39532
|
this.goPackage$1 = null;
|
|
39479
39533
|
this.java$1 = null;
|
|
@@ -39494,14 +39548,14 @@ $c_Lio_kaitai_struct_RuntimeConfig.prototype.productPrefix__T = (function() {
|
|
|
39494
39548
|
return "RuntimeConfig"
|
|
39495
39549
|
});
|
|
39496
39550
|
$c_Lio_kaitai_struct_RuntimeConfig.prototype.productArity__I = (function() {
|
|
39497
|
-
return
|
|
39551
|
+
return 12
|
|
39498
39552
|
});
|
|
39499
39553
|
$c_Lio_kaitai_struct_RuntimeConfig.prototype.equals__O__Z = (function(x$1) {
|
|
39500
39554
|
if ((this === x$1)) {
|
|
39501
39555
|
return true
|
|
39502
39556
|
} else if ((x$1 instanceof $c_Lio_kaitai_struct_RuntimeConfig)) {
|
|
39503
39557
|
var RuntimeConfig$1 = $as_Lio_kaitai_struct_RuntimeConfig(x$1);
|
|
39504
|
-
if ((((this.autoRead$1 === RuntimeConfig$1.autoRead$1) && (this.readStoresPos$1 === RuntimeConfig$1.readStoresPos$1)) && (this.opaqueTypes$1 === RuntimeConfig$1.opaqueTypes$1))) {
|
|
39558
|
+
if (((((this.autoRead$1 === RuntimeConfig$1.autoRead$1) && (this.readStoresPos$1 === RuntimeConfig$1.readStoresPos$1)) && (this.opaqueTypes$1 === RuntimeConfig$1.opaqueTypes$1)) && (this.zeroCopySubstream$1 === RuntimeConfig$1.zeroCopySubstream$1))) {
|
|
39505
39559
|
var x = this.cppConfig$1;
|
|
39506
39560
|
var x$2 = RuntimeConfig$1.cppConfig$1;
|
|
39507
39561
|
var jsx$2 = ((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))
|
|
@@ -39524,6 +39578,21 @@ $c_Lio_kaitai_struct_RuntimeConfig.prototype.equals__O__Z = (function(x$1) {
|
|
|
39524
39578
|
return false
|
|
39525
39579
|
}
|
|
39526
39580
|
});
|
|
39581
|
+
$c_Lio_kaitai_struct_RuntimeConfig.prototype.init___Z__Z__Z__Z__Lio_kaitai_struct_CppRuntimeConfig__T__Lio_kaitai_struct_JavaRuntimeConfig__T__T__T__T__T = (function(autoRead, readStoresPos, opaqueTypes, zeroCopySubstream, cppConfig, goPackage, java, dotNetNamespace, phpNamespace, pythonPackage, nimModule, nimOpaque) {
|
|
39582
|
+
this.autoRead$1 = autoRead;
|
|
39583
|
+
this.readStoresPos$1 = readStoresPos;
|
|
39584
|
+
this.opaqueTypes$1 = opaqueTypes;
|
|
39585
|
+
this.zeroCopySubstream$1 = zeroCopySubstream;
|
|
39586
|
+
this.cppConfig$1 = cppConfig;
|
|
39587
|
+
this.goPackage$1 = goPackage;
|
|
39588
|
+
this.java$1 = java;
|
|
39589
|
+
this.dotNetNamespace$1 = dotNetNamespace;
|
|
39590
|
+
this.phpNamespace$1 = phpNamespace;
|
|
39591
|
+
this.pythonPackage$1 = pythonPackage;
|
|
39592
|
+
this.nimModule$1 = nimModule;
|
|
39593
|
+
this.nimOpaque$1 = nimOpaque;
|
|
39594
|
+
return this
|
|
39595
|
+
});
|
|
39527
39596
|
$c_Lio_kaitai_struct_RuntimeConfig.prototype.productElement__I__O = (function(x$1) {
|
|
39528
39597
|
switch (x$1) {
|
|
39529
39598
|
case 0: {
|
|
@@ -39539,34 +39608,38 @@ $c_Lio_kaitai_struct_RuntimeConfig.prototype.productElement__I__O = (function(x$
|
|
|
39539
39608
|
break
|
|
39540
39609
|
}
|
|
39541
39610
|
case 3: {
|
|
39542
|
-
return this.
|
|
39611
|
+
return this.zeroCopySubstream$1;
|
|
39543
39612
|
break
|
|
39544
39613
|
}
|
|
39545
39614
|
case 4: {
|
|
39546
|
-
return this.
|
|
39615
|
+
return this.cppConfig$1;
|
|
39547
39616
|
break
|
|
39548
39617
|
}
|
|
39549
39618
|
case 5: {
|
|
39550
|
-
return this.
|
|
39619
|
+
return this.goPackage$1;
|
|
39551
39620
|
break
|
|
39552
39621
|
}
|
|
39553
39622
|
case 6: {
|
|
39554
|
-
return this.
|
|
39623
|
+
return this.java$1;
|
|
39555
39624
|
break
|
|
39556
39625
|
}
|
|
39557
39626
|
case 7: {
|
|
39558
|
-
return this.
|
|
39627
|
+
return this.dotNetNamespace$1;
|
|
39559
39628
|
break
|
|
39560
39629
|
}
|
|
39561
39630
|
case 8: {
|
|
39562
|
-
return this.
|
|
39631
|
+
return this.phpNamespace$1;
|
|
39563
39632
|
break
|
|
39564
39633
|
}
|
|
39565
39634
|
case 9: {
|
|
39566
|
-
return this.
|
|
39635
|
+
return this.pythonPackage$1;
|
|
39567
39636
|
break
|
|
39568
39637
|
}
|
|
39569
39638
|
case 10: {
|
|
39639
|
+
return this.nimModule$1;
|
|
39640
|
+
break
|
|
39641
|
+
}
|
|
39642
|
+
case 11: {
|
|
39570
39643
|
return this.nimOpaque$1;
|
|
39571
39644
|
break
|
|
39572
39645
|
}
|
|
@@ -39578,25 +39651,12 @@ $c_Lio_kaitai_struct_RuntimeConfig.prototype.productElement__I__O = (function(x$
|
|
|
39578
39651
|
$c_Lio_kaitai_struct_RuntimeConfig.prototype.toString__T = (function() {
|
|
39579
39652
|
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
39580
39653
|
});
|
|
39581
|
-
$c_Lio_kaitai_struct_RuntimeConfig.prototype.init___Z__Z__Z__Lio_kaitai_struct_CppRuntimeConfig__T__Lio_kaitai_struct_JavaRuntimeConfig__T__T__T__T__T = (function(autoRead, readStoresPos, opaqueTypes, cppConfig, goPackage, java, dotNetNamespace, phpNamespace, pythonPackage, nimModule, nimOpaque) {
|
|
39582
|
-
this.autoRead$1 = autoRead;
|
|
39583
|
-
this.readStoresPos$1 = readStoresPos;
|
|
39584
|
-
this.opaqueTypes$1 = opaqueTypes;
|
|
39585
|
-
this.cppConfig$1 = cppConfig;
|
|
39586
|
-
this.goPackage$1 = goPackage;
|
|
39587
|
-
this.java$1 = java;
|
|
39588
|
-
this.dotNetNamespace$1 = dotNetNamespace;
|
|
39589
|
-
this.phpNamespace$1 = phpNamespace;
|
|
39590
|
-
this.pythonPackage$1 = pythonPackage;
|
|
39591
|
-
this.nimModule$1 = nimModule;
|
|
39592
|
-
this.nimOpaque$1 = nimOpaque;
|
|
39593
|
-
return this
|
|
39594
|
-
});
|
|
39595
39654
|
$c_Lio_kaitai_struct_RuntimeConfig.prototype.hashCode__I = (function() {
|
|
39596
39655
|
var acc = (-889275714);
|
|
39597
39656
|
acc = $m_sr_Statics$().mix__I__I__I(acc, (this.autoRead$1 ? 1231 : 1237));
|
|
39598
39657
|
acc = $m_sr_Statics$().mix__I__I__I(acc, (this.readStoresPos$1 ? 1231 : 1237));
|
|
39599
39658
|
acc = $m_sr_Statics$().mix__I__I__I(acc, (this.opaqueTypes$1 ? 1231 : 1237));
|
|
39659
|
+
acc = $m_sr_Statics$().mix__I__I__I(acc, (this.zeroCopySubstream$1 ? 1231 : 1237));
|
|
39600
39660
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.cppConfig$1));
|
|
39601
39661
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.goPackage$1));
|
|
39602
39662
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.java$1));
|
|
@@ -39605,7 +39665,7 @@ $c_Lio_kaitai_struct_RuntimeConfig.prototype.hashCode__I = (function() {
|
|
|
39605
39665
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.pythonPackage$1));
|
|
39606
39666
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.nimModule$1));
|
|
39607
39667
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.nimOpaque$1));
|
|
39608
|
-
return $m_sr_Statics$().finalizeHash__I__I__I(acc,
|
|
39668
|
+
return $m_sr_Statics$().finalizeHash__I__I__I(acc, 12)
|
|
39609
39669
|
});
|
|
39610
39670
|
$c_Lio_kaitai_struct_RuntimeConfig.prototype.productIterator__sc_Iterator = (function() {
|
|
39611
39671
|
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
@@ -42291,6 +42351,9 @@ $c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.innerClasse
|
|
|
42291
42351
|
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.importFile__T__V = (function(file) {
|
|
42292
42352
|
/*<skip>*/
|
|
42293
42353
|
});
|
|
42354
|
+
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List = (function(id, ut, condSpec) {
|
|
42355
|
+
return $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List(this, id, ut, condSpec)
|
|
42356
|
+
});
|
|
42294
42357
|
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.instanceDeclHeader__sci_List__V = (function(className) {
|
|
42295
42358
|
/*<skip>*/
|
|
42296
42359
|
});
|
|
@@ -47859,6 +47922,12 @@ $c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById.prototype.productPrefix__T = (fu
|
|
|
47859
47922
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById.prototype.productArity__I = (function() {
|
|
47860
47923
|
return 3
|
|
47861
47924
|
});
|
|
47925
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById.prototype.init___Lio_kaitai_struct_exprlang_Ast$identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$typeId = (function(enumName, id, inType) {
|
|
47926
|
+
this.enumName$1 = enumName;
|
|
47927
|
+
this.id$1 = id;
|
|
47928
|
+
this.inType$1 = inType;
|
|
47929
|
+
return this
|
|
47930
|
+
});
|
|
47862
47931
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById.prototype.equals__O__Z = (function(x$1) {
|
|
47863
47932
|
if ((this === x$1)) {
|
|
47864
47933
|
return true
|
|
@@ -47884,12 +47953,6 @@ $c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById.prototype.equals__O__Z = (functi
|
|
|
47884
47953
|
return false
|
|
47885
47954
|
}
|
|
47886
47955
|
});
|
|
47887
|
-
$c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById.prototype.init___Lio_kaitai_struct_exprlang_Ast$identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$typeId = (function(enumName, id, inType) {
|
|
47888
|
-
this.enumName$1 = enumName;
|
|
47889
|
-
this.id$1 = id;
|
|
47890
|
-
this.inType$1 = inType;
|
|
47891
|
-
return this
|
|
47892
|
-
});
|
|
47893
47956
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$EnumById.prototype.productElement__I__O = (function(x$1) {
|
|
47894
47957
|
switch (x$1) {
|
|
47895
47958
|
case 0: {
|
|
@@ -48700,14 +48763,14 @@ $h_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype = $c_Lio_kaitai_struct_
|
|
|
48700
48763
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.productPrefix__T = (function() {
|
|
48701
48764
|
return "UnaryOp"
|
|
48702
48765
|
});
|
|
48766
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.productArity__I = (function() {
|
|
48767
|
+
return 2
|
|
48768
|
+
});
|
|
48703
48769
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.init___Lio_kaitai_struct_exprlang_Ast$unaryop__Lio_kaitai_struct_exprlang_Ast$expr = (function(op, operand) {
|
|
48704
48770
|
this.op$1 = op;
|
|
48705
48771
|
this.operand$1 = operand;
|
|
48706
48772
|
return this
|
|
48707
48773
|
});
|
|
48708
|
-
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.productArity__I = (function() {
|
|
48709
|
-
return 2
|
|
48710
|
-
});
|
|
48711
48774
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.equals__O__Z = (function(x$1) {
|
|
48712
48775
|
if ((this === x$1)) {
|
|
48713
48776
|
return true
|
|
@@ -50249,6 +50312,7 @@ function $c_Lio_kaitai_struct_format_MetaSpec() {
|
|
|
50249
50312
|
this.encoding$1 = null;
|
|
50250
50313
|
this.forceDebug$1 = false;
|
|
50251
50314
|
this.opaqueTypes$1 = null;
|
|
50315
|
+
this.zeroCopySubstream$1 = null;
|
|
50252
50316
|
this.imports$1 = null
|
|
50253
50317
|
}
|
|
50254
50318
|
$c_Lio_kaitai_struct_format_MetaSpec.prototype = new $h_O();
|
|
@@ -50262,7 +50326,7 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.productPrefix__T = (function() {
|
|
|
50262
50326
|
return "MetaSpec"
|
|
50263
50327
|
});
|
|
50264
50328
|
$c_Lio_kaitai_struct_format_MetaSpec.prototype.productArity__I = (function() {
|
|
50265
|
-
return
|
|
50329
|
+
return 10
|
|
50266
50330
|
});
|
|
50267
50331
|
$c_Lio_kaitai_struct_format_MetaSpec.prototype.equals__O__Z = (function(x$1) {
|
|
50268
50332
|
if ((this === x$1)) {
|
|
@@ -50274,42 +50338,49 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.equals__O__Z = (function(x$1) {
|
|
|
50274
50338
|
if ((((x === null) ? (x$2 === null) : x.equals__O__Z(x$2)) && (this.isOpaque$1 === MetaSpec$1.isOpaque$1))) {
|
|
50275
50339
|
var x$3 = this.id$1;
|
|
50276
50340
|
var x$4 = MetaSpec$1.id$1;
|
|
50277
|
-
var jsx$
|
|
50341
|
+
var jsx$6 = ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
|
|
50278
50342
|
} else {
|
|
50279
|
-
var jsx$
|
|
50343
|
+
var jsx$6 = false
|
|
50280
50344
|
};
|
|
50281
|
-
if (jsx$
|
|
50345
|
+
if (jsx$6) {
|
|
50282
50346
|
var x$5 = this.endian$1;
|
|
50283
50347
|
var x$6 = MetaSpec$1.endian$1;
|
|
50284
|
-
var jsx$
|
|
50348
|
+
var jsx$5 = ((x$5 === null) ? (x$6 === null) : x$5.equals__O__Z(x$6))
|
|
50285
50349
|
} else {
|
|
50286
|
-
var jsx$
|
|
50350
|
+
var jsx$5 = false
|
|
50287
50351
|
};
|
|
50288
|
-
if (jsx$
|
|
50352
|
+
if (jsx$5) {
|
|
50289
50353
|
var x$7 = this.bitEndian$1;
|
|
50290
50354
|
var x$8 = MetaSpec$1.bitEndian$1;
|
|
50291
|
-
var jsx$
|
|
50355
|
+
var jsx$4 = ((x$7 === null) ? (x$8 === null) : x$7.equals__O__Z(x$8))
|
|
50292
50356
|
} else {
|
|
50293
|
-
var jsx$
|
|
50357
|
+
var jsx$4 = false
|
|
50294
50358
|
};
|
|
50295
|
-
if (jsx$
|
|
50359
|
+
if (jsx$4) {
|
|
50296
50360
|
var x$9 = this.encoding$1;
|
|
50297
50361
|
var x$10 = MetaSpec$1.encoding$1;
|
|
50298
|
-
var jsx$
|
|
50362
|
+
var jsx$3 = ((x$9 === null) ? (x$10 === null) : x$9.equals__O__Z(x$10))
|
|
50299
50363
|
} else {
|
|
50300
|
-
var jsx$
|
|
50364
|
+
var jsx$3 = false
|
|
50301
50365
|
};
|
|
50302
|
-
if ((jsx$
|
|
50366
|
+
if ((jsx$3 && (this.forceDebug$1 === MetaSpec$1.forceDebug$1))) {
|
|
50303
50367
|
var x$11 = this.opaqueTypes$1;
|
|
50304
50368
|
var x$12 = MetaSpec$1.opaqueTypes$1;
|
|
50305
|
-
var jsx$
|
|
50369
|
+
var jsx$2 = ((x$11 === null) ? (x$12 === null) : x$11.equals__O__Z(x$12))
|
|
50370
|
+
} else {
|
|
50371
|
+
var jsx$2 = false
|
|
50372
|
+
};
|
|
50373
|
+
if (jsx$2) {
|
|
50374
|
+
var x$13 = this.zeroCopySubstream$1;
|
|
50375
|
+
var x$14 = MetaSpec$1.zeroCopySubstream$1;
|
|
50376
|
+
var jsx$1 = ((x$13 === null) ? (x$14 === null) : x$13.equals__O__Z(x$14))
|
|
50306
50377
|
} else {
|
|
50307
50378
|
var jsx$1 = false
|
|
50308
50379
|
};
|
|
50309
50380
|
if (jsx$1) {
|
|
50310
|
-
var x$
|
|
50311
|
-
var x$
|
|
50312
|
-
return ((x$
|
|
50381
|
+
var x$15 = this.imports$1;
|
|
50382
|
+
var x$16 = MetaSpec$1.imports$1;
|
|
50383
|
+
return ((x$15 === null) ? (x$16 === null) : x$15.equals__O__Z(x$16))
|
|
50313
50384
|
} else {
|
|
50314
50385
|
return false
|
|
50315
50386
|
}
|
|
@@ -50352,6 +50423,10 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.productElement__I__O = (function(
|
|
|
50352
50423
|
break
|
|
50353
50424
|
}
|
|
50354
50425
|
case 8: {
|
|
50426
|
+
return this.zeroCopySubstream$1;
|
|
50427
|
+
break
|
|
50428
|
+
}
|
|
50429
|
+
case 9: {
|
|
50355
50430
|
return this.imports$1;
|
|
50356
50431
|
break
|
|
50357
50432
|
}
|
|
@@ -50360,18 +50435,6 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.productElement__I__O = (function(
|
|
|
50360
50435
|
}
|
|
50361
50436
|
}
|
|
50362
50437
|
});
|
|
50363
|
-
$c_Lio_kaitai_struct_format_MetaSpec.prototype.init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__sci_List = (function(path, isOpaque, id, endian, bitEndian, encoding, forceDebug, opaqueTypes, imports) {
|
|
50364
|
-
this.path$1 = path;
|
|
50365
|
-
this.isOpaque$1 = isOpaque;
|
|
50366
|
-
this.id$1 = id;
|
|
50367
|
-
this.endian$1 = endian;
|
|
50368
|
-
this.bitEndian$1 = bitEndian;
|
|
50369
|
-
this.encoding$1 = encoding;
|
|
50370
|
-
this.forceDebug$1 = forceDebug;
|
|
50371
|
-
this.opaqueTypes$1 = opaqueTypes;
|
|
50372
|
-
this.imports$1 = imports;
|
|
50373
|
-
return this
|
|
50374
|
-
});
|
|
50375
50438
|
$c_Lio_kaitai_struct_format_MetaSpec.prototype.toString__T = (function() {
|
|
50376
50439
|
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
50377
50440
|
});
|
|
@@ -50405,34 +50468,49 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.fillInEndian__s_Option__Lio_kaita
|
|
|
50405
50468
|
var x$6 = this.encoding$1;
|
|
50406
50469
|
var x$7 = this.forceDebug$1;
|
|
50407
50470
|
var x$8 = this.opaqueTypes$1;
|
|
50408
|
-
var x$9 = this.
|
|
50409
|
-
|
|
50471
|
+
var x$9 = this.zeroCopySubstream$1;
|
|
50472
|
+
var x$10 = this.imports$1;
|
|
50473
|
+
return new $c_Lio_kaitai_struct_format_MetaSpec().init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List(x$2$2, x$3$2, x$4$2, x$1, x$5, x$6, x$7, x$8, x$9, x$10)
|
|
50410
50474
|
}
|
|
50411
50475
|
};
|
|
50412
50476
|
var p12 = $as_s_Option(x1.$$und1$f);
|
|
50413
50477
|
var p13 = $as_s_Option(x1.$$und2$f);
|
|
50414
50478
|
if ((p12 instanceof $c_s_Some)) {
|
|
50415
|
-
var x$
|
|
50416
|
-
var jsx$2 = (x$
|
|
50479
|
+
var x$11 = $m_s_None$();
|
|
50480
|
+
var jsx$2 = (x$11 === p13)
|
|
50417
50481
|
} else {
|
|
50418
50482
|
var jsx$2 = false
|
|
50419
50483
|
};
|
|
50420
50484
|
if (jsx$2) {
|
|
50421
|
-
var x$
|
|
50422
|
-
var x$
|
|
50423
|
-
var x$
|
|
50424
|
-
var x$
|
|
50425
|
-
var x$
|
|
50426
|
-
var x$
|
|
50427
|
-
var x$
|
|
50428
|
-
var x$
|
|
50429
|
-
|
|
50485
|
+
var x$12$2 = this.path$1;
|
|
50486
|
+
var x$13 = this.isOpaque$1;
|
|
50487
|
+
var x$14 = this.id$1;
|
|
50488
|
+
var x$15 = this.bitEndian$1;
|
|
50489
|
+
var x$16 = this.encoding$1;
|
|
50490
|
+
var x$17 = this.forceDebug$1;
|
|
50491
|
+
var x$18 = this.opaqueTypes$1;
|
|
50492
|
+
var x$19 = this.zeroCopySubstream$1;
|
|
50493
|
+
var x$20 = this.imports$1;
|
|
50494
|
+
return new $c_Lio_kaitai_struct_format_MetaSpec().init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List(x$12$2, x$13, x$14, defEndian, x$15, x$16, x$17, x$18, x$19, x$20)
|
|
50430
50495
|
};
|
|
50431
50496
|
throw new $c_s_MatchError().init___O(x1)
|
|
50432
50497
|
});
|
|
50433
50498
|
$c_Lio_kaitai_struct_format_MetaSpec.prototype.fillInDefaults__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_format_MetaSpec = (function(defSpec) {
|
|
50434
50499
|
return this.fillInEncoding__p1__s_Option__Lio_kaitai_struct_format_MetaSpec(defSpec.encoding$1).fillInEndian__s_Option__Lio_kaitai_struct_format_MetaSpec(defSpec.endian$1).fillInBitEndian__s_Option__Lio_kaitai_struct_format_MetaSpec(defSpec.bitEndian$1)
|
|
50435
50500
|
});
|
|
50501
|
+
$c_Lio_kaitai_struct_format_MetaSpec.prototype.init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List = (function(path, isOpaque, id, endian, bitEndian, encoding, forceDebug, opaqueTypes, zeroCopySubstream, imports) {
|
|
50502
|
+
this.path$1 = path;
|
|
50503
|
+
this.isOpaque$1 = isOpaque;
|
|
50504
|
+
this.id$1 = id;
|
|
50505
|
+
this.endian$1 = endian;
|
|
50506
|
+
this.bitEndian$1 = bitEndian;
|
|
50507
|
+
this.encoding$1 = encoding;
|
|
50508
|
+
this.forceDebug$1 = forceDebug;
|
|
50509
|
+
this.opaqueTypes$1 = opaqueTypes;
|
|
50510
|
+
this.zeroCopySubstream$1 = zeroCopySubstream;
|
|
50511
|
+
this.imports$1 = imports;
|
|
50512
|
+
return this
|
|
50513
|
+
});
|
|
50436
50514
|
$c_Lio_kaitai_struct_format_MetaSpec.prototype.fillInBitEndian__s_Option__Lio_kaitai_struct_format_MetaSpec = (function(defBitEndian) {
|
|
50437
50515
|
var x1 = new $c_T2().init___O__O(defBitEndian, this.bitEndian$1);
|
|
50438
50516
|
var p2 = $as_s_Option(x1.$$und1$f);
|
|
@@ -50460,8 +50538,9 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.fillInBitEndian__s_Option__Lio_ka
|
|
|
50460
50538
|
var x$6 = this.encoding$1;
|
|
50461
50539
|
var x$7 = this.forceDebug$1;
|
|
50462
50540
|
var x$8 = this.opaqueTypes$1;
|
|
50463
|
-
var x$9 = this.
|
|
50464
|
-
|
|
50541
|
+
var x$9 = this.zeroCopySubstream$1;
|
|
50542
|
+
var x$10 = this.imports$1;
|
|
50543
|
+
return new $c_Lio_kaitai_struct_format_MetaSpec().init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List(x$2$2, x$3$2, x$4$2, x$5, defBitEndian, x$6, x$7, x$8, x$9, x$10)
|
|
50465
50544
|
};
|
|
50466
50545
|
throw new $c_s_MatchError().init___O(x1)
|
|
50467
50546
|
});
|
|
@@ -50492,8 +50571,9 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.fillInEncoding__p1__s_Option__Lio
|
|
|
50492
50571
|
var x$6 = this.bitEndian$1;
|
|
50493
50572
|
var x$7 = this.forceDebug$1;
|
|
50494
50573
|
var x$8 = this.opaqueTypes$1;
|
|
50495
|
-
var x$9 = this.
|
|
50496
|
-
|
|
50574
|
+
var x$9 = this.zeroCopySubstream$1;
|
|
50575
|
+
var x$10 = this.imports$1;
|
|
50576
|
+
return new $c_Lio_kaitai_struct_format_MetaSpec().init___sci_List__Z__s_Option__s_Option__s_Option__s_Option__Z__s_Option__s_Option__sci_List(x$2$2, x$3$2, x$4$2, x$5, x$6, defEncoding, x$7, x$8, x$9, x$10)
|
|
50497
50577
|
};
|
|
50498
50578
|
throw new $c_s_MatchError().init___O(x1)
|
|
50499
50579
|
});
|
|
@@ -50510,8 +50590,9 @@ $c_Lio_kaitai_struct_format_MetaSpec.prototype.hashCode__I = (function() {
|
|
|
50510
50590
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.encoding$1));
|
|
50511
50591
|
acc = $m_sr_Statics$().mix__I__I__I(acc, (this.forceDebug$1 ? 1231 : 1237));
|
|
50512
50592
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.opaqueTypes$1));
|
|
50593
|
+
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.zeroCopySubstream$1));
|
|
50513
50594
|
acc = $m_sr_Statics$().mix__I__I__I(acc, $m_sr_Statics$().anyHash__O__I(this.imports$1));
|
|
50514
|
-
return $m_sr_Statics$().finalizeHash__I__I__I(acc,
|
|
50595
|
+
return $m_sr_Statics$().finalizeHash__I__I__I(acc, 10)
|
|
50515
50596
|
});
|
|
50516
50597
|
$c_Lio_kaitai_struct_format_MetaSpec.prototype.productIterator__sc_Iterator = (function() {
|
|
50517
50598
|
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
@@ -66631,12 +66712,12 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arraySize__Lio_kaitai_
|
|
|
66631
66712
|
return this.arraySize__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
|
|
66632
66713
|
});
|
|
66633
66714
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doStrCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(left, op, right) {
|
|
66634
|
-
var x
|
|
66635
|
-
if ((
|
|
66715
|
+
var x = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
66716
|
+
if ((x === op)) {
|
|
66636
66717
|
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left) + ".equals(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
|
|
66637
66718
|
} else {
|
|
66638
|
-
var x$
|
|
66639
|
-
if ((
|
|
66719
|
+
var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
66720
|
+
if ((x$3 === op)) {
|
|
66640
66721
|
return (((("!(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ").equals(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ")")
|
|
66641
66722
|
} else {
|
|
66642
66723
|
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(left)) + ".compareTo(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(right)) + ") ") + $f_Lio_kaitai_struct_translators_CommonOps__cmpOp__Lio_kaitai_struct_exprlang_Ast$cmpop__T(this, op)) + " 0)")
|
|
@@ -67984,7 +68065,20 @@ $c_Lio_kaitai_struct_translators_RubyTranslator.prototype.strToInt__Lio_kaitai_s
|
|
|
67984
68065
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
67985
68066
|
});
|
|
67986
68067
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesToStr__T__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(bytesExpr, encoding) {
|
|
67987
|
-
|
|
68068
|
+
var encodingOpt = $f_Lio_kaitai_struct_exprlang_Ast$expr__evaluateStrConst__s_Option(encoding);
|
|
68069
|
+
if ((encodingOpt instanceof $c_s_Some)) {
|
|
68070
|
+
var x2 = $as_s_Some(encodingOpt);
|
|
68071
|
+
var encodingConst = $as_T(x2.value$2);
|
|
68072
|
+
var encodingConstLower = $as_T(encodingConst.toLowerCase());
|
|
68073
|
+
var needEncode = ((encodingConstLower !== "utf8") && (encodingConstLower !== "utf-8"))
|
|
68074
|
+
} else {
|
|
68075
|
+
var x = $m_s_None$();
|
|
68076
|
+
if ((!(x === encodingOpt))) {
|
|
68077
|
+
throw new $c_s_MatchError().init___O(encodingOpt)
|
|
68078
|
+
};
|
|
68079
|
+
var needEncode = true
|
|
68080
|
+
};
|
|
68081
|
+
return ((((("(" + bytesExpr) + ").force_encoding(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(encoding)) + ")") + (needEncode ? ".encode('UTF-8')" : ""))
|
|
67988
68082
|
});
|
|
67989
68083
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__O = (function(value, et) {
|
|
67990
68084
|
return this.enumToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType$EnumType__T(value, et)
|
|
@@ -73492,9 +73586,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.runReadCalc__V = (function(
|
|
|
73492
73586
|
this.outSrc$2.dec__V();
|
|
73493
73587
|
this.outSrc$2.puts__T__V("}")
|
|
73494
73588
|
});
|
|
73495
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.outFileName__T__T = (function(topClassName) {
|
|
73496
|
-
return topClassName
|
|
73497
|
-
});
|
|
73498
73589
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
73499
73590
|
this.outSrc$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
|
|
73500
73591
|
});
|
|
@@ -82990,8 +83081,9 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatEos_
|
|
|
82990
83081
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
|
|
82991
83082
|
});
|
|
82992
83083
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
82993
|
-
var
|
|
82994
|
-
|
|
83084
|
+
var id$1 = new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(id);
|
|
83085
|
+
var ioName = $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1);
|
|
83086
|
+
this.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V($m_Lio_kaitai_struct_datatype_DataType$KaitaiStreamType$(), ioName, (((io + ".substream(") + this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(sizeExpr)) + ");"));
|
|
82995
83087
|
return ioName
|
|
82996
83088
|
});
|
|
82997
83089
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
@@ -83051,6 +83143,35 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilHeader__Lio
|
|
|
83051
83143
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V = (function(id, dataType, io, rep, isRaw, defEndian, assignTypeOpt) {
|
|
83052
83144
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(this, id, dataType, io, rep, isRaw, defEndian, assignTypeOpt)
|
|
83053
83145
|
});
|
|
83146
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List = (function(id, ut, condSpec) {
|
|
83147
|
+
if (this.config$1.zeroCopySubstream$1) {
|
|
83148
|
+
var x1 = ut.bytes$4;
|
|
83149
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesLimitType)) {
|
|
83150
|
+
var x2 = $as_Lio_kaitai_struct_datatype_DataType$BytesLimitType(x1);
|
|
83151
|
+
var p3 = x2.terminator$2;
|
|
83152
|
+
var p5 = x2.padRight$2;
|
|
83153
|
+
var p6 = x2.process$2;
|
|
83154
|
+
var x = $m_s_None$();
|
|
83155
|
+
if ((x === p3)) {
|
|
83156
|
+
var x$3 = $m_s_None$();
|
|
83157
|
+
if ((x$3 === p5)) {
|
|
83158
|
+
var x$5 = $m_s_None$();
|
|
83159
|
+
var jsx$1 = (x$5 === p6)
|
|
83160
|
+
} else {
|
|
83161
|
+
var jsx$1 = false
|
|
83162
|
+
}
|
|
83163
|
+
} else {
|
|
83164
|
+
var jsx$1 = false
|
|
83165
|
+
};
|
|
83166
|
+
if (jsx$1) {
|
|
83167
|
+
return $m_sci_Nil$()
|
|
83168
|
+
}
|
|
83169
|
+
};
|
|
83170
|
+
return $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List(this, id, ut, condSpec)
|
|
83171
|
+
} else {
|
|
83172
|
+
return $f_Lio_kaitai_struct_languages_components_ExtraAttrs__extraRawAttrForUserTypeFromBytes__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes__Lio_kaitai_struct_format_ConditionalSpec__sci_List(this, id, ut, condSpec)
|
|
83173
|
+
}
|
|
83174
|
+
});
|
|
83054
83175
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.popPos__T__V = (function(io) {
|
|
83055
83176
|
this.out$2.puts__T__V((io + ".seek(_pos);"))
|
|
83056
83177
|
});
|
|
@@ -83590,8 +83711,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.outHeader__Lio_kaitai_stru
|
|
|
83590
83711
|
return this.outHeader$2
|
|
83591
83712
|
});
|
|
83592
83713
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
83593
|
-
var
|
|
83594
|
-
var ioName = (
|
|
83714
|
+
var id = new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(varName);
|
|
83715
|
+
var ioName = $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id);
|
|
83595
83716
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? this.translator$2.doName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1) : this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep));
|
|
83596
83717
|
var this$1 = this.importList$2;
|
|
83597
83718
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "io.kaitai.struct.ByteBufferKaitaiStream");
|
package/package.json
CHANGED