kaitai-struct-compiler 0.10.0-SNAPSHOT20220706.122302.50f80d7e → 0.10.0-SNAPSHOT20220726.4438.57d8dc2a
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/README.md +33 -21
- package/kaitai-struct-compiler.js +178 -111
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ a nice, easy-to-comprehend API.
|
|
|
16
16
|
|
|
17
17
|
For more info on Kaitai Struct, please refer to http://kaitai.io/
|
|
18
18
|
|
|
19
|
-
Note that reference Kaitai Struct compiler is written Scala, and thus
|
|
19
|
+
Note that reference Kaitai Struct compiler is written in Scala, and thus
|
|
20
20
|
can be compiled for a variety of platforms, such as JVM, JavaScript
|
|
21
21
|
and native binaries. This package is compiled to be run JavaScript
|
|
22
22
|
environments.
|
|
@@ -33,7 +33,8 @@ the compiler). If you:
|
|
|
33
33
|
(compiling it on the fly) => use
|
|
34
34
|
[Kaitai Struct loader for JavaScript](https://github.com/kaitai-io/kaitai-struct-loader).
|
|
35
35
|
* want to integrate compiler into your build flow => use a JVM-based
|
|
36
|
-
desktop compiler, which can be called
|
|
36
|
+
[desktop compiler](https://kaitai.io/#download), which can be called
|
|
37
|
+
as a command-line utility
|
|
37
38
|
|
|
38
39
|
## Installation
|
|
39
40
|
|
|
@@ -53,9 +54,9 @@ Our [examples repository](https://github.com/kaitai-io/kaitai_struct_examples) c
|
|
|
53
54
|
|
|
54
55
|
## Plugging in
|
|
55
56
|
|
|
56
|
-
We publish the compiler as
|
|
57
|
+
We publish the compiler as a [UMD module](https://github.com/umdjs/umd), so it works from various environments, including server-side (e.g. Node.js) and client-side (e.g. web browser) ones.
|
|
57
58
|
|
|
58
|
-
Note: currently we don't publish the compiler as standard ES module. This will probably change in the future. If you need ES module please comment on [this issue](https://github.com/kaitai-io/kaitai_struct/issues/180).
|
|
59
|
+
Note: currently we don't publish the compiler as standard ES module. This will probably change in the future. If you need ES module, please comment on [this issue](https://github.com/kaitai-io/kaitai_struct/issues/180).
|
|
59
60
|
|
|
60
61
|
### node
|
|
61
62
|
|
|
@@ -67,18 +68,18 @@ var compiler = new KaitaiStructCompiler();
|
|
|
67
68
|
### browser using script tags
|
|
68
69
|
|
|
69
70
|
```html
|
|
70
|
-
<script src="node_modules/kaitai-struct-compiler/kaitai-struct-compiler.js"></script>
|
|
71
|
+
<script src="node_modules/kaitai-struct-compiler/kaitai-struct-compiler.js"></script>
|
|
71
72
|
<script>
|
|
72
73
|
var compiler = new KaitaiStructCompiler();
|
|
73
74
|
</script>
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
### browser using AMD loader (
|
|
77
|
+
### browser using AMD loader (e.g. require.js)
|
|
77
78
|
|
|
78
79
|
```html
|
|
79
80
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
|
|
80
81
|
<script>
|
|
81
|
-
requirejs.config({
|
|
82
|
+
requirejs.config({
|
|
82
83
|
paths: {
|
|
83
84
|
'kaitai-struct-compiler': 'node_modules/kaitai-struct-compiler/kaitai-struct-compiler'
|
|
84
85
|
}
|
|
@@ -132,32 +133,45 @@ yamlImporter.importYaml("import_outer.ksy").then(function(ksy) {
|
|
|
132
133
|
|
|
133
134
|
### Debug mode
|
|
134
135
|
|
|
135
|
-
You can compile in debug mode
|
|
136
|
+
You can compile `.ksy` source files in debug mode by setting the `debugMode` parameter to `true`. This has two effects (these can be controlled separately in the JVM-based desktop compiler since 0.9 - see [#332](https://github.com/kaitai-io/kaitai_struct/issues/332#issuecomment-454795155), but not yet in this JS compiler):
|
|
136
137
|
|
|
137
|
-
|
|
138
|
+
* objects created from user-defined `types` (and the top-level type with name specified in `/meta/id`) in the .ksy file will have a `_debug` map, which stores start and end offsets of each attribute - this is used in visualizers.
|
|
139
|
+
|
|
140
|
+
On the JVM-based desktop compiler, this can be enabled with `--read-pos`.
|
|
141
|
+
|
|
142
|
+
* the `_read` method (responsible for reading the `seq` structure defined in the .ksy file) will no longer be automatically called from constructors in the generated parser code, so you have to call it manually like this:
|
|
143
|
+
|
|
144
|
+
```diff
|
|
145
|
+
var g = new Gif(new KaitaiStream(data));
|
|
146
|
+
+g._read();
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
On the JVM-based desktop compiler, this can be enabled with `--no-auto-read`.
|
|
150
|
+
|
|
151
|
+
## Licensing
|
|
138
152
|
|
|
139
153
|
### Main code
|
|
140
154
|
|
|
141
|
-
Kaitai Struct compiler itself is copyright (C) 2015-
|
|
155
|
+
Kaitai Struct compiler itself is copyright (C) 2015-2022 Kaitai
|
|
142
156
|
Project.
|
|
143
157
|
|
|
144
158
|
This program is free software: you can redistribute it and/or modify
|
|
145
159
|
it under the terms of the GNU General Public License as published by
|
|
146
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
147
|
-
your option) any later version.
|
|
160
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
161
|
+
(at your option) any later version.
|
|
148
162
|
|
|
149
|
-
This program is distributed in the hope that it will be useful,
|
|
150
|
-
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
151
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
152
|
-
General Public License for more details.
|
|
163
|
+
This program is distributed in the hope that it will be useful,
|
|
164
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
165
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
166
|
+
GNU General Public License for more details.
|
|
153
167
|
|
|
154
168
|
You should have received a copy of the GNU General Public License
|
|
155
|
-
along with this program. If not, see <
|
|
169
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
156
170
|
|
|
157
171
|
### FastParse
|
|
158
172
|
|
|
159
173
|
Portions of Kaitai Struct compiler are loosely based on
|
|
160
|
-
[pythonparse](https://github.com/lihaoyi/fastparse/tree/
|
|
174
|
+
[pythonparse](https://github.com/com-lihaoyi/fastparse/tree/1.0.0/pythonparse/shared/src/main/scala/pythonparse)
|
|
161
175
|
from [FastParse](https://com-lihaoyi.github.io/fastparse/) and are copyright
|
|
162
176
|
(c) 2014 Li Haoyi (haoyi.sg@gmail.com).
|
|
163
177
|
|
|
@@ -182,11 +196,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
182
196
|
|
|
183
197
|
### Libraries used
|
|
184
198
|
|
|
185
|
-
Kaitai Struct compiler depends on the following libraries:
|
|
199
|
+
Kaitai Struct compiler in JavaScript depends on the following libraries:
|
|
186
200
|
|
|
187
|
-
* [scopt](https://github.com/scopt/scopt) — MIT license
|
|
188
201
|
* [fastparse](https://com-lihaoyi.github.io/fastparse/) — MIT license
|
|
189
|
-
* [snakeyaml](https://bitbucket.org/asomov/snakeyaml) — Apache 2.0 license
|
|
190
202
|
|
|
191
203
|
---
|
|
192
204
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
} else {
|
|
7
7
|
root.KaitaiStructCompiler = factory();
|
|
8
8
|
}
|
|
9
|
-
}(this, function () {
|
|
9
|
+
}(typeof self !== 'undefined' ? self : this, function () {
|
|
10
10
|
|
|
11
11
|
var exports = {};
|
|
12
12
|
var __ScalaJSEnv = { exportsNamespace: exports };
|
|
@@ -4395,9 +4395,9 @@ function $h_Lio_kaitai_struct_Version$() {
|
|
|
4395
4395
|
$h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
|
|
4396
4396
|
$c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
|
|
4397
4397
|
this.name$1 = "kaitai-struct-compiler-js";
|
|
4398
|
-
this.version$1 = "0.10-
|
|
4399
|
-
this.gitCommit$1 = "
|
|
4400
|
-
this.gitTime$1 = "2022-07-
|
|
4398
|
+
this.version$1 = "0.10-SNAPSHOT20220726.004438.57d8dc2a";
|
|
4399
|
+
this.gitCommit$1 = "57d8dc2a";
|
|
4400
|
+
this.gitTime$1 = "2022-07-26T00:44:38+00:00";
|
|
4401
4401
|
return this
|
|
4402
4402
|
});
|
|
4403
4403
|
var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
|
|
@@ -29538,6 +29538,31 @@ function $m_Lio_kaitai_struct_languages_CppCompiler$() {
|
|
|
29538
29538
|
};
|
|
29539
29539
|
return $n_Lio_kaitai_struct_languages_CppCompiler$
|
|
29540
29540
|
}
|
|
29541
|
+
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 ((byteType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesLimitType)) {
|
|
29543
|
+
var x2 = $as_Lio_kaitai_struct_datatype_DataType$BytesLimitType(byteType);
|
|
29544
|
+
var sizeExpr = x2.size$2;
|
|
29545
|
+
var p3 = x2.terminator$2;
|
|
29546
|
+
var p5 = x2.padRight$2;
|
|
29547
|
+
var p6 = x2.process$2;
|
|
29548
|
+
var x = $m_s_None$();
|
|
29549
|
+
if ((x === p3)) {
|
|
29550
|
+
var x$3 = $m_s_None$();
|
|
29551
|
+
if ((x$3 === p5)) {
|
|
29552
|
+
var x$5 = $m_s_None$();
|
|
29553
|
+
var jsx$1 = (x$5 === p6)
|
|
29554
|
+
} else {
|
|
29555
|
+
var jsx$1 = false
|
|
29556
|
+
}
|
|
29557
|
+
} else {
|
|
29558
|
+
var jsx$1 = false
|
|
29559
|
+
};
|
|
29560
|
+
if (jsx$1) {
|
|
29561
|
+
return $thiz.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(id, sizeExpr, io)
|
|
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)
|
|
29565
|
+
}
|
|
29541
29566
|
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) {
|
|
29542
29567
|
var x = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
29543
29568
|
if ((x === rep)) {
|
|
@@ -29555,6 +29580,24 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handle
|
|
|
29555
29580
|
}
|
|
29556
29581
|
}
|
|
29557
29582
|
}
|
|
29583
|
+
function $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) {
|
|
29584
|
+
var rawId = new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id);
|
|
29585
|
+
var assignTypeOpt = $m_s_None$();
|
|
29586
|
+
$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($thiz, rawId, byteType, io, rep, true, defEndian, assignTypeOpt);
|
|
29587
|
+
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
29588
|
+
if ((x === rep)) {
|
|
29589
|
+
/*<skip>*/
|
|
29590
|
+
} else {
|
|
29591
|
+
new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(byteType)
|
|
29592
|
+
};
|
|
29593
|
+
if ($is_Lio_kaitai_struct_languages_components_AllocateAndStoreIO($thiz)) {
|
|
29594
|
+
return $as_Lio_kaitai_struct_languages_components_AllocateAndStoreIO($thiz).allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(rawId, rep)
|
|
29595
|
+
} else if ($is_Lio_kaitai_struct_languages_components_AllocateIOLocalVar($thiz)) {
|
|
29596
|
+
return $as_Lio_kaitai_struct_languages_components_AllocateIOLocalVar($thiz).allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(rawId, rep)
|
|
29597
|
+
} else {
|
|
29598
|
+
throw new $c_s_MatchError().init___O($thiz)
|
|
29599
|
+
}
|
|
29600
|
+
}
|
|
29558
29601
|
function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrBytesTypeParse__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$BytesType__T__Lio_kaitai_struct_format_RepeatSpec__Z__V($thiz, id, dataType, io, rep, isRaw) {
|
|
29559
29602
|
var x1 = dataType.process__s_Option();
|
|
29560
29603
|
var x = $m_s_None$();
|
|
@@ -29607,27 +29650,17 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrSw
|
|
|
29607
29650
|
})
|
|
29608
29651
|
})($thiz, id, io, rep, defEndian, assignType)))
|
|
29609
29652
|
}
|
|
29653
|
+
function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T($thiz, id, sizeExpr, io) {
|
|
29654
|
+
var byteType = new $c_Lio_kaitai_struct_datatype_DataType$BytesLimitType().init___Lio_kaitai_struct_exprlang_Ast$expr__s_Option__Z__s_Option__s_Option(sizeExpr, $m_s_None$(), false, $m_s_None$(), $m_s_None$());
|
|
29655
|
+
var rep = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
29656
|
+
var defEndian = $m_s_None$();
|
|
29657
|
+
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)
|
|
29658
|
+
}
|
|
29610
29659
|
function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrUserTypeParse__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType$UserType__T__Lio_kaitai_struct_format_RepeatSpec__s_Option__Lio_kaitai_struct_datatype_DataType__V($thiz, id, dataType, io, rep, defEndian, assignType) {
|
|
29611
29660
|
if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
|
|
29612
29661
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(dataType);
|
|
29613
|
-
var rawId = new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id);
|
|
29614
29662
|
var byteType = x2.bytes$4;
|
|
29615
|
-
var
|
|
29616
|
-
$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($thiz, rawId, byteType, io, rep, true, defEndian, assignTypeOpt);
|
|
29617
|
-
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
29618
|
-
if ((x === rep)) {
|
|
29619
|
-
/*<skip>*/
|
|
29620
|
-
} else {
|
|
29621
|
-
new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(byteType)
|
|
29622
|
-
};
|
|
29623
|
-
if ($is_Lio_kaitai_struct_languages_components_AllocateAndStoreIO($thiz)) {
|
|
29624
|
-
var newIO = $as_Lio_kaitai_struct_languages_components_AllocateAndStoreIO($thiz).allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(rawId, rep)
|
|
29625
|
-
} else {
|
|
29626
|
-
if ((!$is_Lio_kaitai_struct_languages_components_AllocateIOLocalVar($thiz))) {
|
|
29627
|
-
throw new $c_s_MatchError().init___O($thiz)
|
|
29628
|
-
};
|
|
29629
|
-
var newIO = $as_Lio_kaitai_struct_languages_components_AllocateIOLocalVar($thiz).allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(rawId, rep)
|
|
29630
|
-
}
|
|
29663
|
+
var newIO = $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)
|
|
29631
29664
|
} else {
|
|
29632
29665
|
if ((!(dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream))) {
|
|
29633
29666
|
throw new $c_s_MatchError().init___O(dataType)
|
|
@@ -29638,8 +29671,8 @@ function $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__attrUs
|
|
|
29638
29671
|
if ($as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).config$1.autoRead$1) {
|
|
29639
29672
|
$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, false)
|
|
29640
29673
|
} else {
|
|
29641
|
-
var x
|
|
29642
|
-
if ((x
|
|
29674
|
+
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
29675
|
+
if ((x === rep)) {
|
|
29643
29676
|
$thiz.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(id, expr);
|
|
29644
29677
|
$thiz.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V($thiz.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id), dataType, assignType)
|
|
29645
29678
|
} else {
|
|
@@ -73139,6 +73172,9 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrInit__Lio_kaitai_struct
|
|
|
73139
73172
|
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attr.id__Lio_kaitai_struct_format_Identifier()) + " = ") + this.nullPtr__T()) + ";"))
|
|
73140
73173
|
}
|
|
73141
73174
|
});
|
|
73175
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classForwardDeclaration__sci_List__V = (function(name) {
|
|
73176
|
+
this.outHdr$2.puts__T__V((("class " + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(name)) + ";"))
|
|
73177
|
+
});
|
|
73142
73178
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classDestructorHeader__sci_List__Lio_kaitai_struct_datatype_DataType__sci_List__V = (function(name, parentType, topClassName) {
|
|
73143
73179
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
|
|
73144
73180
|
this.outHdr$2.puts__T__V("void _clean_up();");
|
|
@@ -73183,9 +73219,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classDestructorHeader__sci_
|
|
|
73183
73219
|
this.outSrc$2.puts__T__V((("void " + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(name)) + "::_clean_up() {"));
|
|
73184
73220
|
this.outSrc$2.inc__V()
|
|
73185
73221
|
});
|
|
73186
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classForwardDeclaration__sci_List__V = (function(name) {
|
|
73187
|
-
this.outHdr$2.puts__T__V((("class " + $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(name)) + ";"))
|
|
73188
|
-
});
|
|
73189
73222
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructWithSafeguardHeader$1__p2__T__V = (function(ptr) {
|
|
73190
73223
|
this.outSrc$2.puts__T__V((("if (" + ptr) + ") {"));
|
|
73191
73224
|
this.outSrc$2.inc__V()
|
|
@@ -73289,6 +73322,9 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.condIfHeader__Lio_kaitai_st
|
|
|
73289
73322
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
73290
73323
|
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->push_back(") + this.stdMoveWrap__T__T(expr)) + ");"))
|
|
73291
73324
|
});
|
|
73325
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
73326
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
73327
|
+
});
|
|
73292
73328
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
73293
73329
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
73294
73330
|
});
|
|
@@ -73553,16 +73589,16 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classFooter__sci_List__V =
|
|
|
73553
73589
|
this.outHdr$2.dec__V();
|
|
73554
73590
|
this.outHdr$2.puts__T__V("};")
|
|
73555
73591
|
});
|
|
73592
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
73593
|
+
var expr = ((!((assignType === null) ? (dataType === null) : assignType.equals__O__Z(dataType))) ? (((("static_cast<" + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType, false)) + ">(") + id) + ")") : id);
|
|
73594
|
+
this.outSrc$2.puts__T__V((expr + "->_read();"))
|
|
73595
|
+
});
|
|
73556
73596
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$ = (function() {
|
|
73557
73597
|
if ((this.PublicAccess$module$2 === null)) {
|
|
73558
73598
|
this.PublicAccess$lzycompute$1__p2__V()
|
|
73559
73599
|
};
|
|
73560
73600
|
return this.PublicAccess$module$2
|
|
73561
73601
|
});
|
|
73562
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
73563
|
-
var expr = ((!((assignType === null) ? (dataType === null) : assignType.equals__O__Z(dataType))) ? (((("static_cast<" + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType, false)) + ">(") + id) + ")") : id);
|
|
73564
|
-
this.outSrc$2.puts__T__V((expr + "->_read();"))
|
|
73565
|
-
});
|
|
73566
73602
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceFooter__V = (function() {
|
|
73567
73603
|
this.outSrc$2.dec__V();
|
|
73568
73604
|
this.outSrc$2.puts__T__V("}")
|
|
@@ -75889,6 +75925,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condIfHeader__Lio_ka
|
|
|
75889
75925
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
75890
75926
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + expr) + ");"))
|
|
75891
75927
|
});
|
|
75928
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
75929
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
75930
|
+
});
|
|
75892
75931
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
75893
75932
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
75894
75933
|
});
|
|
@@ -76251,12 +76290,12 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugName__Lio_k
|
|
|
76251
76290
|
};
|
|
76252
76291
|
return (("this._debug." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId)) + arrIndexExpr)
|
|
76253
76292
|
});
|
|
76254
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
76255
|
-
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(this, instName, dataType, value)
|
|
76256
|
-
});
|
|
76257
76293
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
76258
76294
|
return this.outHeader$2
|
|
76259
76295
|
});
|
|
76296
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
76297
|
+
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(this, instName, dataType, value)
|
|
76298
|
+
});
|
|
76260
76299
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
76261
76300
|
var langName = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
76262
76301
|
this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
@@ -76265,9 +76304,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.allocateIO__Lio_kait
|
|
|
76265
76304
|
this.out$2.puts__T__V((((("var " + ioName) + " = new KaitaiStream(") + args) + ");"));
|
|
76266
76305
|
return ioName
|
|
76267
76306
|
});
|
|
76268
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
76269
|
-
/*<skip>*/
|
|
76270
|
-
});
|
|
76271
76307
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
76272
76308
|
this.outHeader$2.puts__T__V("// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild");
|
|
76273
76309
|
var this$1 = this.outHeader$2;
|
|
@@ -76275,6 +76311,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.fileHeader__T__V = (
|
|
|
76275
76311
|
var this$2 = this.importList$2;
|
|
76276
76312
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "kaitai-struct/KaitaiStream")
|
|
76277
76313
|
});
|
|
76314
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
76315
|
+
/*<skip>*/
|
|
76316
|
+
});
|
|
76278
76317
|
var $d_Lio_kaitai_struct_languages_JavaScriptCompiler = new $TypeData().initClass({
|
|
76279
76318
|
Lio_kaitai_struct_languages_JavaScriptCompiler: 0
|
|
76280
76319
|
}, false, "io.kaitai.struct.languages.JavaScriptCompiler", {
|
|
@@ -76710,12 +76749,12 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
76710
76749
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrDebugStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__s_Option__Lio_kaitai_struct_format_RepeatSpec__V = (function(attrName, attrType, io, repeat) {
|
|
76711
76750
|
/*<skip>*/
|
|
76712
76751
|
});
|
|
76713
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatExprFooter__V = (function() {
|
|
76714
|
-
this.universalFooter__V()
|
|
76715
|
-
});
|
|
76716
76752
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.outImports__Lio_kaitai_struct_format_ClassSpec__T = (function(topClass) {
|
|
76717
76753
|
return ""
|
|
76718
76754
|
});
|
|
76755
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatExprFooter__V = (function() {
|
|
76756
|
+
this.universalFooter__V()
|
|
76757
|
+
});
|
|
76719
76758
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig = (function(typeProvider, config) {
|
|
76720
76759
|
$c_Lio_kaitai_struct_languages_components_LanguageCompiler.prototype.init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig.call(this, typeProvider, config);
|
|
76721
76760
|
$f_Lio_kaitai_struct_languages_components_SingleOutputFile__$$init$__V(this);
|
|
@@ -76754,6 +76793,12 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatUntil
|
|
|
76754
76793
|
this.out$2.puts__T__V((((tmpName + " = ") + expr) + ";"));
|
|
76755
76794
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + tmpName) + ";"))
|
|
76756
76795
|
});
|
|
76796
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$out$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
76797
|
+
this.out$2 = x$1
|
|
76798
|
+
});
|
|
76799
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.type2class__T__T = (function(name) {
|
|
76800
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
76801
|
+
});
|
|
76757
76802
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
76758
76803
|
var x = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
76759
76804
|
if (x.equals__O__Z(attrName)) {
|
|
@@ -76771,12 +76816,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attributeDeclaration__Lio_k
|
|
|
76771
76816
|
this.out$2.puts__T__V((("protected $_m_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
76772
76817
|
}
|
|
76773
76818
|
});
|
|
76774
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$out$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
76775
|
-
this.out$2 = x$1
|
|
76776
|
-
});
|
|
76777
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.type2class__T__T = (function(name) {
|
|
76778
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
76779
|
-
});
|
|
76780
76819
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List = (function(id, rep) {
|
|
76781
76820
|
return $m_sci_Nil$()
|
|
76782
76821
|
});
|
|
@@ -76787,6 +76826,9 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condIfHeader__Lio_kaitai_st
|
|
|
76787
76826
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
76788
76827
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + expr) + ";"))
|
|
76789
76828
|
});
|
|
76829
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
76830
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
76831
|
+
});
|
|
76790
76832
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
76791
76833
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
76792
76834
|
});
|
|
@@ -77101,6 +77143,10 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.allocateIO__Lio_kaitai_stru
|
|
|
77101
77143
|
this.out$2.puts__T__V((((ioName + " = new \\Kaitai\\Struct\\Stream(") + args) + ");"));
|
|
77102
77144
|
return ioName
|
|
77103
77145
|
});
|
|
77146
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
77147
|
+
this.out$2.puts__T__V("<?php");
|
|
77148
|
+
this.out$2.puts__T__V("// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild")
|
|
77149
|
+
});
|
|
77104
77150
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
77105
77151
|
var x = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
77106
77152
|
if (x.equals__O__Z(attrName)) {
|
|
@@ -77115,10 +77161,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attributeReader__Lio_kaitai
|
|
|
77115
77161
|
jsx$2.puts__T__V((((("public function " + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() { return ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; }"))
|
|
77116
77162
|
}
|
|
77117
77163
|
});
|
|
77118
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
77119
|
-
this.out$2.puts__T__V("<?php");
|
|
77120
|
-
this.out$2.puts__T__V("// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild")
|
|
77121
|
-
});
|
|
77122
77164
|
var $d_Lio_kaitai_struct_languages_PHPCompiler = new $TypeData().initClass({
|
|
77123
77165
|
Lio_kaitai_struct_languages_PHPCompiler: 0
|
|
77124
77166
|
}, false, "io.kaitai.struct.languages.PHPCompiler", {
|
|
@@ -77204,13 +77246,13 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceHeader__sci_List__
|
|
|
77204
77246
|
this.out$2.inc__V();
|
|
77205
77247
|
this.out$2.puts__T__V("my ($self) = @_;")
|
|
77206
77248
|
});
|
|
77249
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
77250
|
+
return (("$self->{" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "}")
|
|
77251
|
+
});
|
|
77207
77252
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
|
|
77208
77253
|
this.typeProvider$1.$$undcurrentSwitchType$1 = new $c_s_Some().init___O(this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on));
|
|
77209
77254
|
this.out$2.puts__T__V((("my $_on = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ";"))
|
|
77210
77255
|
});
|
|
77211
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
77212
|
-
return (("$self->{" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "}")
|
|
77213
|
-
});
|
|
77214
77256
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.seek__T__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(io, pos) {
|
|
77215
77257
|
this.out$2.puts__T__V((((io + "->seek(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, pos)) + ");"))
|
|
77216
77258
|
});
|
|
@@ -77382,12 +77424,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatExprHeader__Lio_
|
|
|
77382
77424
|
this.out$2.puts__T__V((("for (my $i = 0; $i < " + nVar) + "; $i++) {"));
|
|
77383
77425
|
this.out$2.inc__V()
|
|
77384
77426
|
});
|
|
77385
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
77386
|
-
this.out$2.puts__T__V((io + "->align_to_byte();"))
|
|
77387
|
-
});
|
|
77388
77427
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
77389
77428
|
return ("$_t_" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
77390
77429
|
});
|
|
77430
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
77431
|
+
this.out$2.puts__T__V((io + "->align_to_byte();"))
|
|
77432
|
+
});
|
|
77391
77433
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.out__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
77392
77434
|
return this.out$2
|
|
77393
77435
|
});
|
|
@@ -77433,6 +77475,9 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
77433
77475
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
77434
77476
|
this.out$2.puts__T__V((((("push @{" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + "}, ") + expr) + ";"))
|
|
77435
77477
|
});
|
|
77478
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
77479
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
77480
|
+
});
|
|
77436
77481
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
77437
77482
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
77438
77483
|
});
|
|
@@ -78299,12 +78344,12 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatExprHeader__Lio_
|
|
|
78299
78344
|
this.out$2.puts__T__V((("for i in 0.." + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + " {"));
|
|
78300
78345
|
this.out$2.inc__V()
|
|
78301
78346
|
});
|
|
78302
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
78303
|
-
this.out$2.puts__T__V((io + ".alignToByte();"))
|
|
78304
|
-
});
|
|
78305
78347
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
78306
78348
|
return ("$_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
78307
78349
|
});
|
|
78350
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
78351
|
+
this.out$2.puts__T__V((io + ".alignToByte();"))
|
|
78352
|
+
});
|
|
78308
78353
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.out__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
78309
78354
|
return this.out$2
|
|
78310
78355
|
});
|
|
@@ -78373,6 +78418,9 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
78373
78418
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
78374
78419
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ");"))
|
|
78375
78420
|
});
|
|
78421
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
78422
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
78423
|
+
});
|
|
78376
78424
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
78377
78425
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
78378
78426
|
});
|
|
@@ -78486,12 +78534,12 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.userTypeDebugRead__T__Lio_
|
|
|
78486
78534
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceFooter__V = (function() {
|
|
78487
78535
|
this.universalFooter__V()
|
|
78488
78536
|
});
|
|
78489
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.runRead__sci_List__V = (function(name) {
|
|
78490
|
-
/*<skip>*/
|
|
78491
|
-
});
|
|
78492
78537
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.attributeDoc__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_DocSpec__V = (function(id, doc) {
|
|
78493
78538
|
this.universalDoc__Lio_kaitai_struct_format_DocSpec__V(doc)
|
|
78494
78539
|
});
|
|
78540
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.runRead__sci_List__V = (function(name) {
|
|
78541
|
+
/*<skip>*/
|
|
78542
|
+
});
|
|
78495
78543
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.attrDebugEnd__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__V = (function(attrName, attrType, io, repeat) {
|
|
78496
78544
|
/*<skip>*/
|
|
78497
78545
|
});
|
|
@@ -78772,14 +78820,14 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio
|
|
|
78772
78820
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
78773
78821
|
return ("p_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
78774
78822
|
});
|
|
78775
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
78776
|
-
this.outHeader$2 = x$1
|
|
78777
|
-
});
|
|
78778
78823
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfElseStart__V = (function() {
|
|
78779
78824
|
this.out$2.puts__T__V("else");
|
|
78780
78825
|
this.out$2.puts__T__V("{");
|
|
78781
78826
|
this.out$2.inc__V()
|
|
78782
78827
|
});
|
|
78828
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
78829
|
+
this.outHeader$2 = x$1
|
|
78830
|
+
});
|
|
78783
78831
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
78784
78832
|
var this$1 = this.importList$2;
|
|
78785
78833
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
|
|
@@ -79157,9 +79205,15 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condIfHeader__Lio_kaitai
|
|
|
79157
79205
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
79158
79206
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".Add(") + expr) + ");"))
|
|
79159
79207
|
});
|
|
79208
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
79209
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
79210
|
+
});
|
|
79160
79211
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
79161
79212
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
79162
79213
|
});
|
|
79214
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
79215
|
+
this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
|
|
79216
|
+
});
|
|
79163
79217
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
|
|
79164
79218
|
var readAccessAndType = ((!this.config$1.autoRead$1) ? "public" : "private");
|
|
79165
79219
|
if ((endian instanceof $c_s_Some)) {
|
|
@@ -79179,9 +79233,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readHeader__s_Option__Z_
|
|
|
79179
79233
|
this.out$2.puts__T__V("{");
|
|
79180
79234
|
this.out$2.inc__V()
|
|
79181
79235
|
});
|
|
79182
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
79183
|
-
this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
|
|
79184
|
-
});
|
|
79185
79236
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.results__Lio_kaitai_struct_format_ClassSpec__sci_Map = (function(topClass) {
|
|
79186
79237
|
return $f_Lio_kaitai_struct_languages_components_SingleOutputFile__results__Lio_kaitai_struct_format_ClassSpec__sci_Map(this, topClass)
|
|
79187
79238
|
});
|
|
@@ -79643,13 +79694,13 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatEosHeader__Lio_ka
|
|
|
79643
79694
|
this.out$2.puts__T__V((("while not " + io) + ":is_eof() do"));
|
|
79644
79695
|
this.out$2.inc__V()
|
|
79645
79696
|
});
|
|
79646
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
79647
|
-
this.outHeader$2 = x$1
|
|
79648
|
-
});
|
|
79649
79697
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfElseStart__V = (function() {
|
|
79650
79698
|
this.out$2.puts__T__V("else");
|
|
79651
79699
|
this.out$2.inc__V()
|
|
79652
79700
|
});
|
|
79701
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
79702
|
+
this.outHeader$2 = x$1
|
|
79703
|
+
});
|
|
79653
79704
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
79654
79705
|
if ((needRaw.level__I() >= 1)) {
|
|
79655
79706
|
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)) + " = {}"))
|
|
@@ -79989,9 +80040,17 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condIfHeader__Lio_kaitai_st
|
|
|
79989
80040
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
79990
80041
|
this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i + 1] = ") + expr))
|
|
79991
80042
|
});
|
|
80043
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
80044
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
80045
|
+
});
|
|
79992
80046
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
79993
80047
|
this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i + 1] = ") + expr))
|
|
79994
80048
|
});
|
|
80049
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
80050
|
+
this.out$2.puts__T__V(($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(name) + " = class.class(KaitaiStruct)"));
|
|
80051
|
+
var this$1 = this.out$2;
|
|
80052
|
+
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
80053
|
+
});
|
|
79995
80054
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
|
|
79996
80055
|
if ((endian instanceof $c_s_Some)) {
|
|
79997
80056
|
var x2 = $as_s_Some(endian);
|
|
@@ -80007,11 +80066,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.readHeader__s_Option__Z__V
|
|
|
80007
80066
|
this.out$2.puts__T__V((((("function " + $m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(this.typeProvider$1.nowClass$1.name$1)) + ":_read") + suffix) + "()"));
|
|
80008
80067
|
this.out$2.inc__V()
|
|
80009
80068
|
});
|
|
80010
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
80011
|
-
this.out$2.puts__T__V(($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(name) + " = class.class(KaitaiStruct)"));
|
|
80012
|
-
var this$1 = this.out$2;
|
|
80013
|
-
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
80014
|
-
});
|
|
80015
80069
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.results__Lio_kaitai_struct_format_ClassSpec__sci_Map = (function(topClass) {
|
|
80016
80070
|
return $f_Lio_kaitai_struct_languages_components_SingleOutputFile__results__Lio_kaitai_struct_format_ClassSpec__sci_Map(this, topClass)
|
|
80017
80071
|
});
|
|
@@ -80186,12 +80240,12 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceFooter__V = (functi
|
|
|
80186
80240
|
var this$1 = this.out$2;
|
|
80187
80241
|
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
80188
80242
|
});
|
|
80189
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.runRead__sci_List__V = (function(name) {
|
|
80190
|
-
this.out$2.puts__T__V("self:_read()")
|
|
80191
|
-
});
|
|
80192
80243
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attributeDoc__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_DocSpec__V = (function(id, doc) {
|
|
80193
80244
|
this.universalDoc__Lio_kaitai_struct_format_DocSpec__V(doc)
|
|
80194
80245
|
});
|
|
80246
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.runRead__sci_List__V = (function(name) {
|
|
80247
|
+
this.out$2.puts__T__V("self:_read()")
|
|
80248
|
+
});
|
|
80195
80249
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrDebugEnd__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__V = (function(attrName, attrType, io, repeat) {
|
|
80196
80250
|
/*<skip>*/
|
|
80197
80251
|
});
|
|
@@ -80283,6 +80337,10 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchRequiresIfs__Lio_kait
|
|
|
80283
80337
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.indent__T = (function() {
|
|
80284
80338
|
return " "
|
|
80285
80339
|
});
|
|
80340
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfCaseStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
|
|
80341
|
+
this.out$2.puts__T__V((("elseif _on == " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, condition)) + " then"));
|
|
80342
|
+
this.out$2.inc__V()
|
|
80343
|
+
});
|
|
80286
80344
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrProcess__Lio_kaitai_struct_format_ProcessExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__V = (function(proc, varSrc, varDest, rep) {
|
|
80287
80345
|
var srcExpr = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varSrc, rep);
|
|
80288
80346
|
if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessXor)) {
|
|
@@ -80334,10 +80392,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
80334
80392
|
};
|
|
80335
80393
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
80336
80394
|
});
|
|
80337
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfCaseStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
|
|
80338
|
-
this.out$2.puts__T__V((("elseif _on == " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, condition)) + " then"));
|
|
80339
|
-
this.out$2.inc__V()
|
|
80340
|
-
});
|
|
80341
80395
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.translator__Lio_kaitai_struct_translators_BaseTranslator = (function() {
|
|
80342
80396
|
return this.translator$2
|
|
80343
80397
|
});
|
|
@@ -80421,13 +80475,13 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilFooter__Lio_
|
|
|
80421
80475
|
this.out$2.dec__V();
|
|
80422
80476
|
this.out$2.dec__V()
|
|
80423
80477
|
});
|
|
80478
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchEnd__V = (function() {
|
|
80479
|
+
/*<skip>*/
|
|
80480
|
+
});
|
|
80424
80481
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
80425
80482
|
this.out$2.puts__T__V(((("`" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "`: ") + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(attrType)));
|
|
80426
80483
|
this.out$2.puts__T__V((("`" + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(attrName)) + "`: bool"))
|
|
80427
80484
|
});
|
|
80428
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchEnd__V = (function() {
|
|
80429
|
-
/*<skip>*/
|
|
80430
|
-
});
|
|
80431
80485
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
80432
80486
|
this.out$2.puts__T__V("block:");
|
|
80433
80487
|
this.out$2.inc__V();
|
|
@@ -80816,9 +80870,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchCaseEnd__V = (functio
|
|
|
80816
80870
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
80817
80871
|
this.handleAssignmentIterative__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
80818
80872
|
});
|
|
80819
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
80820
|
-
this.out$2.puts__T__V(((("`" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "`*: ") + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(attrType)))
|
|
80821
|
-
});
|
|
80822
80873
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
|
|
80823
80874
|
this.out$2.puts__T__V((("import \"" + classSpec.name$1.head__O()) + "\""))
|
|
80824
80875
|
});
|
|
@@ -80828,6 +80879,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.io$kaitai$struct$languages$
|
|
|
80828
80879
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.type2class__T__T = (function(name) {
|
|
80829
80880
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
80830
80881
|
});
|
|
80882
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
80883
|
+
this.out$2.puts__T__V(((("`" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "`*: ") + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(attrType)))
|
|
80884
|
+
});
|
|
80831
80885
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List = (function(id, rep) {
|
|
80832
80886
|
return $m_sci_Nil$()
|
|
80833
80887
|
});
|
|
@@ -80838,6 +80892,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.condIfHeader__Lio_kaitai_st
|
|
|
80838
80892
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
80839
80893
|
this.handleAssignmentIterative__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
80840
80894
|
});
|
|
80895
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
80896
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
80897
|
+
});
|
|
80841
80898
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
80842
80899
|
this.handleAssignmentIterative__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
80843
80900
|
});
|
|
@@ -81035,14 +81092,14 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outFileName__T__T = (functi
|
|
|
81035
81092
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$importList$und$eq__Lio_kaitai_struct_ImportList__V = (function(x$1) {
|
|
81036
81093
|
this.importList$2 = x$1
|
|
81037
81094
|
});
|
|
81095
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
81096
|
+
/*<skip>*/
|
|
81097
|
+
});
|
|
81038
81098
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.readFooter__V = (function() {
|
|
81039
81099
|
this.out$2.dec__V();
|
|
81040
81100
|
var this$1 = this.out$2;
|
|
81041
81101
|
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
81042
81102
|
});
|
|
81043
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
81044
|
-
/*<skip>*/
|
|
81045
|
-
});
|
|
81046
81103
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
81047
81104
|
var this$1 = this.out$2;
|
|
81048
81105
|
this$1.sb$2.append__T__scm_StringBuilder("\n");
|
|
@@ -81731,12 +81788,12 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatExprHeader__Lio_
|
|
|
81731
81788
|
this.out$2.puts__T__V((("(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ").times { |i|"));
|
|
81732
81789
|
this.out$2.inc__V()
|
|
81733
81790
|
});
|
|
81734
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
81735
|
-
this.out$2.puts__T__V((io + ".align_to_byte"))
|
|
81736
|
-
});
|
|
81737
81791
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
81738
81792
|
return ("_t_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
81739
81793
|
});
|
|
81794
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
81795
|
+
this.out$2.puts__T__V((io + ".align_to_byte"))
|
|
81796
|
+
});
|
|
81740
81797
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.out__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
81741
81798
|
return this.out$2
|
|
81742
81799
|
});
|
|
@@ -81748,15 +81805,15 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatUnti
|
|
|
81748
81805
|
this.out$2.puts__T__V(((tmpName + " = ") + expr));
|
|
81749
81806
|
this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " << ") + tmpName))
|
|
81750
81807
|
});
|
|
81751
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
81752
|
-
/*<skip>*/
|
|
81753
|
-
});
|
|
81754
81808
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$out$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
81755
81809
|
this.out$2 = x$1
|
|
81756
81810
|
});
|
|
81757
81811
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.type2class__T__T = (function(name) {
|
|
81758
81812
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
81759
81813
|
});
|
|
81814
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
81815
|
+
/*<skip>*/
|
|
81816
|
+
});
|
|
81760
81817
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List = (function(id, rep) {
|
|
81761
81818
|
return $m_sci_Nil$()
|
|
81762
81819
|
});
|
|
@@ -81767,6 +81824,11 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
81767
81824
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
81768
81825
|
this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " << ") + expr))
|
|
81769
81826
|
});
|
|
81827
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
81828
|
+
var ioName = ("_io_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
81829
|
+
this.out$2.puts__T__V((((((ioName + " = ") + io) + ".substream(") + this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(sizeExpr)) + ")"));
|
|
81830
|
+
return ioName
|
|
81831
|
+
});
|
|
81770
81832
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
81771
81833
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
81772
81834
|
});
|
|
@@ -82927,6 +82989,9 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
82927
82989
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
82928
82990
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
|
|
82929
82991
|
});
|
|
82992
|
+
$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
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
82994
|
+
});
|
|
82930
82995
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
82931
82996
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
82932
82997
|
});
|
|
@@ -83086,12 +83151,12 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.userTypeDebugRead__T__Lio_
|
|
|
83086
83151
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceFooter__V = (function() {
|
|
83087
83152
|
this.universalFooter__V()
|
|
83088
83153
|
});
|
|
83089
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.runRead__sci_List__V = (function(name) {
|
|
83090
|
-
this.out$2.puts__T__V("_read();")
|
|
83091
|
-
});
|
|
83092
83154
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attributeDoc__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_DocSpec__V = (function(id, doc) {
|
|
83093
83155
|
this.universalDoc__Lio_kaitai_struct_format_DocSpec__V(doc)
|
|
83094
83156
|
});
|
|
83157
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.runRead__sci_List__V = (function(name) {
|
|
83158
|
+
this.out$2.puts__T__V("_read();")
|
|
83159
|
+
});
|
|
83095
83160
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrDebugEnd__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__V = (function(attrId, attrType, io, rep) {
|
|
83096
83161
|
if (((attrId instanceof $c_Lio_kaitai_struct_format_RawIdentifier) || (attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier))) {
|
|
83097
83162
|
return (void 0)
|
|
@@ -83244,6 +83309,10 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchRequiresIfs__Lio_kai
|
|
|
83244
83309
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.indent__T = (function() {
|
|
83245
83310
|
return " "
|
|
83246
83311
|
});
|
|
83312
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfCaseStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
|
|
83313
|
+
this.out$2.puts__T__V((("else if (" + this.switchCmpExpr__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") {"));
|
|
83314
|
+
this.out$2.inc__V()
|
|
83315
|
+
});
|
|
83247
83316
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrProcess__Lio_kaitai_struct_format_ProcessExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__V = (function(proc, varSrc, varDest, rep) {
|
|
83248
83317
|
var srcExpr = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varSrc, rep);
|
|
83249
83318
|
if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessXor)) {
|
|
@@ -83293,10 +83362,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrProcess__Lio_kaitai_st
|
|
|
83293
83362
|
};
|
|
83294
83363
|
$f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__handleAssignment__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_format_RepeatSpec__Z__V(this, varDest, expr$2, rep, false)
|
|
83295
83364
|
});
|
|
83296
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfCaseStart__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(condition) {
|
|
83297
|
-
this.out$2.puts__T__V((("else if (" + this.switchCmpExpr__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + ") {"));
|
|
83298
|
-
this.out$2.inc__V()
|
|
83299
|
-
});
|
|
83300
83365
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.translator__Lio_kaitai_struct_translators_BaseTranslator = (function() {
|
|
83301
83366
|
return this.translator$2
|
|
83302
83367
|
});
|
|
@@ -83966,6 +84031,12 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatUn
|
|
|
83966
84031
|
this.out$2.puts__T__V(((tmpName + " = ") + expr));
|
|
83967
84032
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + tmpName) + ")"))
|
|
83968
84033
|
});
|
|
84034
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$out$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
84035
|
+
this.out$2 = x$1
|
|
84036
|
+
});
|
|
84037
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.type2class__T__T = (function(name) {
|
|
84038
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
84039
|
+
});
|
|
83969
84040
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
|
|
83970
84041
|
var name = $as_T(classSpec.name$1.head__O());
|
|
83971
84042
|
var jsx$1 = this.out$2;
|
|
@@ -83973,12 +84044,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.opaqueClassDeclaration__
|
|
|
83973
84044
|
var this$2 = new $c_sci_StringOps().init___T(x);
|
|
83974
84045
|
jsx$1.puts__T__V(($f_sc_TraversableOnce__nonEmpty__Z(this$2) ? ((("from " + this.config$1.pythonPackage$1) + " import ") + name) : ("import " + name)))
|
|
83975
84046
|
});
|
|
83976
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$out$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
83977
|
-
this.out$2 = x$1
|
|
83978
|
-
});
|
|
83979
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.type2class__T__T = (function(name) {
|
|
83980
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
83981
|
-
});
|
|
83982
84047
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
83983
84048
|
/*<skip>*/
|
|
83984
84049
|
});
|
|
@@ -83992,6 +84057,9 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condIfHeader__Lio_kaitai
|
|
|
83992
84057
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
83993
84058
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ")"))
|
|
83994
84059
|
});
|
|
84060
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T = (function(id, sizeExpr, io) {
|
|
84061
|
+
return $f_Lio_kaitai_struct_languages_components_EveryReadIsExpression__createSubstreamFixedSize__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__T__T(this, id, sizeExpr, io)
|
|
84062
|
+
});
|
|
83995
84063
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
83996
84064
|
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
83997
84065
|
});
|
|
@@ -95881,4 +95949,3 @@ $e.io.kaitai.struct.MainJs = $m_Lio_kaitai_struct_MainJs$;
|
|
|
95881
95949
|
return exports.io.kaitai.struct.MainJs;
|
|
95882
95950
|
|
|
95883
95951
|
}));
|
|
95884
|
-
|
package/package.json
CHANGED