kaitai-struct-compiler 0.10.0-SNAPSHOT20220409.5702.c4cb01b0 → 0.10.0-SNAPSHOT20220617.120542.c053fb7d
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 +1257 -1218
- package/package.json +1 -1
|
@@ -1505,28 +1505,26 @@ function $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kai
|
|
|
1505
1505
|
return (((rawIo === true) && (rawProcess === false)) ? $m_Lio_kaitai_struct_datatype_RawIo$() : (((rawIo === false) && (rawProcess === true)) ? $m_Lio_kaitai_struct_datatype_RawProcess$() : (((rawIo === true) && (rawProcess === true)) ? $m_Lio_kaitai_struct_datatype_RawIoProcess$() : $m_Lio_kaitai_struct_datatype_NotRaw$())))
|
|
1506
1506
|
}
|
|
1507
1507
|
function $f_Lio_kaitai_struct_languages_components_CommonReads__attrParse0__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__T__s_Option__V($thiz, id, attr, io, defEndian) {
|
|
1508
|
+
var x = attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1;
|
|
1509
|
+
var x$2 = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
1510
|
+
if ((!((x !== null) && x.equals__O__Z(x$2)))) {
|
|
1511
|
+
var jsx$2 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
|
|
1512
|
+
var jsx$1 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1513
|
+
var dataType = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1514
|
+
jsx$2.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V(id, jsx$1, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType))
|
|
1515
|
+
};
|
|
1508
1516
|
var x1 = attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1;
|
|
1509
1517
|
matchEnd9: {
|
|
1510
|
-
var x = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
1511
|
-
if ((x === x1)) {
|
|
1512
|
-
|
|
1513
|
-
var jsx$1 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1514
|
-
var dataType = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1515
|
-
jsx$2.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V(id, io, jsx$1, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType));
|
|
1516
|
-
$thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
|
|
1517
|
-
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatEosFooter__V();
|
|
1518
|
+
var x$3 = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
1519
|
+
if ((x$3 === x1)) {
|
|
1520
|
+
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType());
|
|
1518
1521
|
break matchEnd9
|
|
1519
1522
|
};
|
|
1520
1523
|
if ((x1 instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
|
|
1521
1524
|
var x2 = $as_Lio_kaitai_struct_format_RepeatExpr(x1);
|
|
1522
1525
|
var repeatExpr = x2.expr$1;
|
|
1523
1526
|
if ((repeatExpr !== null)) {
|
|
1524
|
-
|
|
1525
|
-
var jsx$3 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1526
|
-
var dataType$1 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1527
|
-
jsx$4.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, jsx$3, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType$1), repeatExpr);
|
|
1528
|
-
$thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
|
|
1529
|
-
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatExprFooter__V();
|
|
1527
|
+
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType(), repeatExpr);
|
|
1530
1528
|
break matchEnd9
|
|
1531
1529
|
}
|
|
1532
1530
|
};
|
|
@@ -1534,24 +1532,41 @@ function $f_Lio_kaitai_struct_languages_components_CommonReads__attrParse0__Lio_
|
|
|
1534
1532
|
var x3 = $as_Lio_kaitai_struct_format_RepeatUntil(x1);
|
|
1535
1533
|
var untilExpr = x3.expr$1;
|
|
1536
1534
|
if ((untilExpr !== null)) {
|
|
1537
|
-
|
|
1538
|
-
var jsx$5 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1539
|
-
var dataType$2 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1540
|
-
jsx$6.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, jsx$5, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType$2), untilExpr);
|
|
1541
|
-
$thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
|
|
1542
|
-
var jsx$8 = $as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz);
|
|
1543
|
-
var jsx$7 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1544
|
-
var dataType$3 = attr.dataType__Lio_kaitai_struct_datatype_DataType();
|
|
1545
|
-
jsx$8.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, jsx$7, $f_Lio_kaitai_struct_languages_components_CommonReads__needRaw__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw($thiz, dataType$3), untilExpr);
|
|
1535
|
+
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType(), untilExpr);
|
|
1546
1536
|
break matchEnd9
|
|
1547
1537
|
}
|
|
1548
1538
|
};
|
|
1549
|
-
var x$
|
|
1550
|
-
if ((x$
|
|
1551
|
-
$thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
|
|
1539
|
+
var x$5 = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
1540
|
+
if ((x$5 === x1)) {
|
|
1552
1541
|
break matchEnd9
|
|
1553
1542
|
};
|
|
1554
1543
|
throw new $c_s_MatchError().init___O(x1)
|
|
1544
|
+
};
|
|
1545
|
+
$thiz.attrParse2__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__Z__s_Option__s_Option__V(id, attr.dataType__Lio_kaitai_struct_datatype_DataType(), io, attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1, false, defEndian, $thiz.attrParse2$default$7__s_Option());
|
|
1546
|
+
var x1$2 = attr.cond__Lio_kaitai_struct_format_ConditionalSpec().repeat$1;
|
|
1547
|
+
matchEnd8: {
|
|
1548
|
+
var x$7 = $m_Lio_kaitai_struct_format_RepeatEos$();
|
|
1549
|
+
if ((x$7 === x1$2)) {
|
|
1550
|
+
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatEosFooter__V();
|
|
1551
|
+
break matchEnd8
|
|
1552
|
+
};
|
|
1553
|
+
if ((x1$2 instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
|
|
1554
|
+
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatExprFooter__V();
|
|
1555
|
+
break matchEnd8
|
|
1556
|
+
};
|
|
1557
|
+
if ((x1$2 instanceof $c_Lio_kaitai_struct_format_RepeatUntil)) {
|
|
1558
|
+
var x2$2 = $as_Lio_kaitai_struct_format_RepeatUntil(x1$2);
|
|
1559
|
+
var untilExpr$2 = x2$2.expr$1;
|
|
1560
|
+
if ((untilExpr$2 !== null)) {
|
|
1561
|
+
$as_Lio_kaitai_struct_languages_components_LanguageCompiler($thiz).condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V(id, io, attr.dataType__Lio_kaitai_struct_datatype_DataType(), untilExpr$2);
|
|
1562
|
+
break matchEnd8
|
|
1563
|
+
}
|
|
1564
|
+
};
|
|
1565
|
+
var x$9 = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
1566
|
+
if ((x$9 === x1$2)) {
|
|
1567
|
+
break matchEnd8
|
|
1568
|
+
};
|
|
1569
|
+
throw new $c_s_MatchError().init___O(x1$2)
|
|
1555
1570
|
}
|
|
1556
1571
|
}
|
|
1557
1572
|
function $f_Lio_kaitai_struct_languages_components_CommonReads__attrValidateAll__Lio_kaitai_struct_format_AttrLikeSpec__V($thiz, attr) {
|
|
@@ -4415,9 +4430,9 @@ function $h_Lio_kaitai_struct_Version$() {
|
|
|
4415
4430
|
$h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
|
|
4416
4431
|
$c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
|
|
4417
4432
|
this.name$1 = "kaitai-struct-compiler-js";
|
|
4418
|
-
this.version$1 = "0.10-
|
|
4419
|
-
this.gitCommit$1 = "
|
|
4420
|
-
this.gitTime$1 = "2022-
|
|
4433
|
+
this.version$1 = "0.10-SNAPSHOT20220617.120542.c053fb7d";
|
|
4434
|
+
this.gitCommit$1 = "c053fb7d";
|
|
4435
|
+
this.gitTime$1 = "2022-06-17T12:05:42+00:00";
|
|
4421
4436
|
return this
|
|
4422
4437
|
});
|
|
4423
4438
|
var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
|
|
@@ -9294,20 +9309,19 @@ function $f_Lio_kaitai_struct_languages_components_SwitchIfOps__switchCases__Lio
|
|
|
9294
9309
|
}
|
|
9295
9310
|
function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidateExprCompare__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_AttrLikeSpec__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__V($thiz, attrId, attr, op, expected, err) {
|
|
9296
9311
|
var jsx$4 = $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr);
|
|
9297
|
-
var jsx$3 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare().init___Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr(new $c_Lio_kaitai_struct_exprlang_Ast$expr$
|
|
9312
|
+
var jsx$3 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare().init___Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr(new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier(attrId), op, expected);
|
|
9298
9313
|
$m_sci_List$();
|
|
9299
|
-
var jsx$2 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$
|
|
9300
|
-
var
|
|
9301
|
-
var
|
|
9302
|
-
var
|
|
9303
|
-
var array = [expected, jsx$2, jsx$1, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str().init___T($f_sc_TraversableOnce__mkString__T__T__T__T(this$2, "/", "/", ""))];
|
|
9314
|
+
var jsx$2 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier(attrId);
|
|
9315
|
+
var jsx$1 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
9316
|
+
var this$1 = attr.path__sci_List();
|
|
9317
|
+
var array = [expected, jsx$2, jsx$1, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str().init___T($f_sc_TraversableOnce__mkString__T__T__T__T(this$1, "/", "/", ""))];
|
|
9304
9318
|
var i = (((-1) + $uI(array.length)) | 0);
|
|
9305
9319
|
var result = $m_sci_Nil$();
|
|
9306
9320
|
while ((i >= 0)) {
|
|
9307
|
-
var this$
|
|
9321
|
+
var this$5 = result;
|
|
9308
9322
|
var index = i;
|
|
9309
9323
|
var x = array[index];
|
|
9310
|
-
result = new $c_sci_$colon$colon().init___O__sci_List(x, this$
|
|
9324
|
+
result = new $c_sci_$colon$colon().init___O__sci_List(x, this$5);
|
|
9311
9325
|
i = (((-1) + i) | 0)
|
|
9312
9326
|
};
|
|
9313
9327
|
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, jsx$4, jsx$3, err, result)
|
|
@@ -9348,7 +9362,7 @@ function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidate__Li
|
|
|
9348
9362
|
var f = (function($this, attrId$1) {
|
|
9349
9363
|
return (function(expected$2$2) {
|
|
9350
9364
|
var expected$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr(expected$2$2);
|
|
9351
|
-
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare().init___Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr(new $c_Lio_kaitai_struct_exprlang_Ast$expr$
|
|
9365
|
+
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare().init___Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr(new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier(attrId$1), $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$(), expected$2)
|
|
9352
9366
|
})
|
|
9353
9367
|
})($thiz, attrId);
|
|
9354
9368
|
var this$1 = $m_sci_List$();
|
|
@@ -9386,18 +9400,17 @@ function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidate__Li
|
|
|
9386
9400
|
var jsx$6 = $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr);
|
|
9387
9401
|
var jsx$5 = new $c_Lio_kaitai_struct_datatype_ValidationNotAnyOfError().init___Lio_kaitai_struct_datatype_DataType($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr));
|
|
9388
9402
|
$m_sci_List$();
|
|
9389
|
-
var jsx$4 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$
|
|
9390
|
-
var
|
|
9391
|
-
var
|
|
9392
|
-
var
|
|
9393
|
-
var array = [jsx$4, jsx$3, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str().init___T($f_sc_TraversableOnce__mkString__T__T__T__T(this$5, "/", "/", ""))];
|
|
9403
|
+
var jsx$4 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier(attrId);
|
|
9404
|
+
var jsx$3 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
9405
|
+
var this$4 = attr.path__sci_List();
|
|
9406
|
+
var array = [jsx$4, jsx$3, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str().init___T($f_sc_TraversableOnce__mkString__T__T__T__T(this$4, "/", "/", ""))];
|
|
9394
9407
|
var i = (((-1) + $uI(array.length)) | 0);
|
|
9395
9408
|
var result = $m_sci_Nil$();
|
|
9396
9409
|
while ((i >= 0)) {
|
|
9397
|
-
var this$
|
|
9410
|
+
var this$8 = result;
|
|
9398
9411
|
var index = i;
|
|
9399
9412
|
var x = array[index];
|
|
9400
|
-
result = new $c_sci_$colon$colon().init___O__sci_List(x, this$
|
|
9413
|
+
result = new $c_sci_$colon$colon().init___O__sci_List(x, this$8);
|
|
9401
9414
|
i = (((-1) + i) | 0)
|
|
9402
9415
|
};
|
|
9403
9416
|
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, jsx$6, bigOrExpr, jsx$5, result)
|
|
@@ -9406,22 +9419,21 @@ function $f_Lio_kaitai_struct_languages_components_ValidateOps__attrValidate__Li
|
|
|
9406
9419
|
var expr = x7.checkExpr$1;
|
|
9407
9420
|
$thiz.blockScopeHeader__V();
|
|
9408
9421
|
$thiz.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr));
|
|
9409
|
-
$thiz.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr), $thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator().translate__Lio_kaitai_struct_exprlang_Ast$expr__T(new $c_Lio_kaitai_struct_exprlang_Ast$expr$Name().init___Lio_kaitai_struct_exprlang_Ast$identifier(new $c_Lio_kaitai_struct_exprlang_Ast$identifier().init___T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1))), $thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator().translate__Lio_kaitai_struct_exprlang_Ast$expr__T(new $c_Lio_kaitai_struct_exprlang_Ast$expr$
|
|
9422
|
+
$thiz.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr), $thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator().translate__Lio_kaitai_struct_exprlang_Ast$expr__T(new $c_Lio_kaitai_struct_exprlang_Ast$expr$Name().init___Lio_kaitai_struct_exprlang_Ast$identifier(new $c_Lio_kaitai_struct_exprlang_Ast$identifier().init___T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1))), $thiz.translator__Lio_kaitai_struct_translators_AbstractTranslator().translate__Lio_kaitai_struct_exprlang_Ast$expr__T(new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier(attrId)));
|
|
9410
9423
|
var jsx$10 = $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr);
|
|
9411
9424
|
var jsx$9 = new $c_Lio_kaitai_struct_datatype_ValidationExprError().init___Lio_kaitai_struct_datatype_DataType($f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(attr));
|
|
9412
9425
|
$m_sci_List$();
|
|
9413
|
-
var jsx$8 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$
|
|
9414
|
-
var
|
|
9415
|
-
var
|
|
9416
|
-
var
|
|
9417
|
-
var array$1 = [jsx$8, jsx$7, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str().init___T($f_sc_TraversableOnce__mkString__T__T__T__T(this$11, "/", "/", ""))];
|
|
9426
|
+
var jsx$8 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier(attrId);
|
|
9427
|
+
var jsx$7 = new $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName().init___Lio_kaitai_struct_format_Identifier($m_Lio_kaitai_struct_format_IoIdentifier$());
|
|
9428
|
+
var this$9 = attr.path__sci_List();
|
|
9429
|
+
var array$1 = [jsx$8, jsx$7, new $c_Lio_kaitai_struct_exprlang_Ast$expr$Str().init___T($f_sc_TraversableOnce__mkString__T__T__T__T(this$9, "/", "/", ""))];
|
|
9418
9430
|
var i$1 = (((-1) + $uI(array$1.length)) | 0);
|
|
9419
9431
|
var result$1 = $m_sci_Nil$();
|
|
9420
9432
|
while ((i$1 >= 0)) {
|
|
9421
|
-
var this$
|
|
9433
|
+
var this$13 = result$1;
|
|
9422
9434
|
var index$1 = i$1;
|
|
9423
9435
|
var x$1 = array$1[index$1];
|
|
9424
|
-
result$1 = new $c_sci_$colon$colon().init___O__sci_List(x$1, this$
|
|
9436
|
+
result$1 = new $c_sci_$colon$colon().init___O__sci_List(x$1, this$13);
|
|
9425
9437
|
i$1 = (((-1) + i$1) | 0)
|
|
9426
9438
|
};
|
|
9427
9439
|
$thiz.attrValidateExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_KSError__sci_List__V(attrId, jsx$10, expr, jsx$9, result$1);
|
|
@@ -11223,10 +11235,16 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11223
11235
|
return this$12.determineType__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_datatype_DataType(this$12.nowClass$1, attrName).asNonOwning__Lio_kaitai_struct_datatype_DataType()
|
|
11224
11236
|
}
|
|
11225
11237
|
};
|
|
11238
|
+
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName)) {
|
|
11239
|
+
var x14 = $as_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(v);
|
|
11240
|
+
var id = x14.id$1;
|
|
11241
|
+
var this$13 = this.provider$1;
|
|
11242
|
+
return this$13.determineType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType(this$13.nowClass$1, id)
|
|
11243
|
+
};
|
|
11226
11244
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
|
|
11227
|
-
var
|
|
11228
|
-
var op =
|
|
11229
|
-
var v$2 =
|
|
11245
|
+
var x15 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(v);
|
|
11246
|
+
var op = x15.op$1;
|
|
11247
|
+
var v$2 = x15.operand$1;
|
|
11230
11248
|
if ((op !== null)) {
|
|
11231
11249
|
if ((v$2 !== null)) {
|
|
11232
11250
|
var t$3 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(v$2);
|
|
@@ -11281,10 +11299,10 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11281
11299
|
}
|
|
11282
11300
|
};
|
|
11283
11301
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare)) {
|
|
11284
|
-
var
|
|
11285
|
-
var left =
|
|
11286
|
-
var op$2 =
|
|
11287
|
-
var right =
|
|
11302
|
+
var x16 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Compare(v);
|
|
11303
|
+
var left = x16.left$1;
|
|
11304
|
+
var op$2 = x16.ops$1;
|
|
11305
|
+
var right = x16.right$1;
|
|
11288
11306
|
if ((left !== null)) {
|
|
11289
11307
|
if ((op$2 !== null)) {
|
|
11290
11308
|
if ((right !== null)) {
|
|
@@ -11297,10 +11315,10 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11297
11315
|
}
|
|
11298
11316
|
};
|
|
11299
11317
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp)) {
|
|
11300
|
-
var
|
|
11301
|
-
var left$2 =
|
|
11302
|
-
var op$3 =
|
|
11303
|
-
var right$2 =
|
|
11318
|
+
var x17 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BinOp(v);
|
|
11319
|
+
var left$2 = x17.left$1;
|
|
11320
|
+
var op$3 = x17.op$1;
|
|
11321
|
+
var right$2 = x17.right$1;
|
|
11304
11322
|
if ((left$2 !== null)) {
|
|
11305
11323
|
if ((op$3 !== null)) {
|
|
11306
11324
|
if ((right$2 !== null)) {
|
|
@@ -11332,17 +11350,17 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11332
11350
|
}
|
|
11333
11351
|
};
|
|
11334
11352
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp)) {
|
|
11335
|
-
var
|
|
11336
|
-
var op$4 =
|
|
11337
|
-
var values =
|
|
11353
|
+
var x18 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp(v);
|
|
11354
|
+
var op$4 = x18.op$1;
|
|
11355
|
+
var values = x18.values$1;
|
|
11338
11356
|
if ((op$4 !== null)) {
|
|
11339
11357
|
if ((values !== null)) {
|
|
11340
|
-
values.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this,
|
|
11358
|
+
values.foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this, x38) {
|
|
11341
11359
|
return (function(v$3$2) {
|
|
11342
11360
|
var v$3 = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$3$2);
|
|
11343
11361
|
var t$1 = $this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(v$3);
|
|
11344
11362
|
if ((!(t$1 instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType))) {
|
|
11345
|
-
throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError().init___T((((("unable to use " + t$1) + " argument in ") +
|
|
11363
|
+
throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError().init___T((((("unable to use " + t$1) + " argument in ") + x38) + " boolean expression"))
|
|
11346
11364
|
}
|
|
11347
11365
|
})
|
|
11348
11366
|
})(this, op$4)));
|
|
@@ -11351,10 +11369,10 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11351
11369
|
}
|
|
11352
11370
|
};
|
|
11353
11371
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IfExp)) {
|
|
11354
|
-
var
|
|
11355
|
-
var condition =
|
|
11356
|
-
var ifTrue =
|
|
11357
|
-
var ifFalse =
|
|
11372
|
+
var x19 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IfExp(v);
|
|
11373
|
+
var condition = x19.condition$1;
|
|
11374
|
+
var ifTrue = x19.ifTrue$1;
|
|
11375
|
+
var ifFalse = x19.ifFalse$1;
|
|
11358
11376
|
if ((condition !== null)) {
|
|
11359
11377
|
if ((ifTrue !== null)) {
|
|
11360
11378
|
if ((ifFalse !== null)) {
|
|
@@ -11371,9 +11389,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11371
11389
|
}
|
|
11372
11390
|
};
|
|
11373
11391
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Subscript)) {
|
|
11374
|
-
var
|
|
11375
|
-
var container =
|
|
11376
|
-
var idx =
|
|
11392
|
+
var x20 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Subscript(v);
|
|
11393
|
+
var container = x20.value$1;
|
|
11394
|
+
var idx = x20.idx$1;
|
|
11377
11395
|
if ((container !== null)) {
|
|
11378
11396
|
if ((idx !== null)) {
|
|
11379
11397
|
var x1$5 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(container);
|
|
@@ -11414,9 +11432,9 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11414
11432
|
}
|
|
11415
11433
|
};
|
|
11416
11434
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Attribute)) {
|
|
11417
|
-
var
|
|
11418
|
-
var value =
|
|
11419
|
-
var attr =
|
|
11435
|
+
var x21 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Attribute(v);
|
|
11436
|
+
var value = x21.value$1;
|
|
11437
|
+
var attr = x21.attr$1;
|
|
11420
11438
|
if ((value !== null)) {
|
|
11421
11439
|
if ((attr !== null)) {
|
|
11422
11440
|
return this.detectAttributeType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$identifier__Lio_kaitai_struct_datatype_DataType(value, attr).asNonOwning__Lio_kaitai_struct_datatype_DataType()
|
|
@@ -11424,20 +11442,20 @@ $c_Lio_kaitai_struct_translators_TypeDetector.prototype.detectTypeRaw__Lio_kaita
|
|
|
11424
11442
|
}
|
|
11425
11443
|
};
|
|
11426
11444
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Call)) {
|
|
11427
|
-
var
|
|
11428
|
-
return this.detectCallType__Lio_kaitai_struct_exprlang_Ast$expr$Call__Lio_kaitai_struct_datatype_DataType(
|
|
11445
|
+
var x47 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Call(v);
|
|
11446
|
+
return this.detectCallType__Lio_kaitai_struct_exprlang_Ast$expr$Call__Lio_kaitai_struct_datatype_DataType(x47).asNonOwning__Lio_kaitai_struct_datatype_DataType()
|
|
11429
11447
|
};
|
|
11430
11448
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$List)) {
|
|
11431
|
-
var
|
|
11432
|
-
var values$2 =
|
|
11449
|
+
var x22 = $as_Lio_kaitai_struct_exprlang_Ast$expr$List(v);
|
|
11450
|
+
var values$2 = x22.elts$1;
|
|
11433
11451
|
if ((values$2 !== null)) {
|
|
11434
11452
|
var x1$8 = this.detectArrayType__sc_Seq__Lio_kaitai_struct_datatype_DataType(values$2);
|
|
11435
11453
|
return ((x1$8 instanceof $c_Lio_kaitai_struct_datatype_DataType$Int1Type) ? $m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$() : new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(x1$8))
|
|
11436
11454
|
}
|
|
11437
11455
|
};
|
|
11438
11456
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$CastToType)) {
|
|
11439
|
-
var
|
|
11440
|
-
var typeName =
|
|
11457
|
+
var x23 = $as_Lio_kaitai_struct_exprlang_Ast$expr$CastToType(v);
|
|
11458
|
+
var typeName = x23.typeName$1;
|
|
11441
11459
|
return this.detectCastType__Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_datatype_DataType(typeName)
|
|
11442
11460
|
};
|
|
11443
11461
|
if (((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType) || (v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BitSizeOfType))) {
|
|
@@ -20464,6 +20482,49 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.determineType__Lio_kaitai_struc
|
|
|
20464
20482
|
return (($m_Lio_kaitai_struct_format_Identifier$().IO$1 === attrName) ? $m_Lio_kaitai_struct_datatype_DataType$KaitaiStreamType$() : (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === attrName) ? $as_Lio_kaitai_struct_datatype_DataType(this.$$undcurrentIteratorType$1.get__O()) : (($m_Lio_kaitai_struct_format_Identifier$().SWITCH$undON$1 === attrName) ? $as_Lio_kaitai_struct_datatype_DataType(this.$$undcurrentSwitchType$1.get__O()) : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === attrName) ? $m_Lio_kaitai_struct_datatype_DataType$CalcIntType$() : (($m_Lio_kaitai_struct_format_Identifier$().SIZEOF$1 === attrName) ? $m_Lio_kaitai_struct_datatype_DataType$CalcIntType$() : this.resolveMember__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_format_MemberSpec(inClass, attrName).dataTypeComposite__Lio_kaitai_struct_datatype_DataType())))))
|
|
20465
20483
|
}
|
|
20466
20484
|
});
|
|
20485
|
+
$c_Lio_kaitai_struct_ClassTypeProvider.prototype.determineType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType = (function(inClass, attrId) {
|
|
20486
|
+
var nonLocalReturnKey1 = new $c_O().init___();
|
|
20487
|
+
try {
|
|
20488
|
+
if ((attrId instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
20489
|
+
var this$1 = inClass.seq$1;
|
|
20490
|
+
var these = this$1;
|
|
20491
|
+
while ((!these.isEmpty__Z())) {
|
|
20492
|
+
var arg1 = these.head__O();
|
|
20493
|
+
var el = $as_Lio_kaitai_struct_format_AttrSpec(arg1);
|
|
20494
|
+
var x = el.id$1;
|
|
20495
|
+
if (((x === null) ? (attrId === null) : x.equals__O__Z(attrId))) {
|
|
20496
|
+
throw new $c_sr_NonLocalReturnControl().init___O__O(nonLocalReturnKey1, $f_Lio_kaitai_struct_format_AttrLikeSpec__dataTypeComposite__Lio_kaitai_struct_datatype_DataType(el))
|
|
20497
|
+
};
|
|
20498
|
+
var this$2 = these;
|
|
20499
|
+
these = this$2.tail__sci_List()
|
|
20500
|
+
}
|
|
20501
|
+
} else if ((attrId instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
20502
|
+
var x2 = $as_Lio_kaitai_struct_format_NamedIdentifier(attrId);
|
|
20503
|
+
var name = x2.name$2;
|
|
20504
|
+
return this.determineType__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_datatype_DataType(inClass, name)
|
|
20505
|
+
} else if ((attrId instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
20506
|
+
var x3 = $as_Lio_kaitai_struct_format_InstanceIdentifier(attrId);
|
|
20507
|
+
var name$2 = x3.name$2;
|
|
20508
|
+
return this.determineType__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_datatype_DataType(inClass, name$2)
|
|
20509
|
+
} else if ((attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
20510
|
+
var x4 = $as_Lio_kaitai_struct_format_SpecialIdentifier(attrId);
|
|
20511
|
+
var name$3 = x4.name$2;
|
|
20512
|
+
return this.determineType__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_datatype_DataType(inClass, name$3)
|
|
20513
|
+
};
|
|
20514
|
+
throw new $c_Lio_kaitai_struct_precompile_FieldNotFoundError().init___T__Lio_kaitai_struct_format_ClassSpec(attrId.humanReadable__T(), inClass)
|
|
20515
|
+
} catch (e) {
|
|
20516
|
+
if ((e instanceof $c_sr_NonLocalReturnControl)) {
|
|
20517
|
+
var ex = $as_sr_NonLocalReturnControl(e);
|
|
20518
|
+
if ((ex.key$2 === nonLocalReturnKey1)) {
|
|
20519
|
+
return $as_Lio_kaitai_struct_datatype_DataType(ex.value__O())
|
|
20520
|
+
} else {
|
|
20521
|
+
throw ex
|
|
20522
|
+
}
|
|
20523
|
+
} else {
|
|
20524
|
+
throw e
|
|
20525
|
+
}
|
|
20526
|
+
}
|
|
20527
|
+
});
|
|
20467
20528
|
$c_Lio_kaitai_struct_ClassTypeProvider.prototype.resolveType__Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_datatype_DataType = (function(typeName) {
|
|
20468
20529
|
return this.resolveClassSpec__Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_format_ClassSpec(typeName).toDataType__Lio_kaitai_struct_datatype_DataType()
|
|
20469
20530
|
});
|
|
@@ -20488,7 +20549,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.resolveEnum__Lio_kaitai_struct_
|
|
|
20488
20549
|
return this.resolveEnum__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_format_EnumSpec(this.resolveClassSpec__Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_format_ClassSpec(inType), enumName)
|
|
20489
20550
|
});
|
|
20490
20551
|
$c_Lio_kaitai_struct_ClassTypeProvider.prototype.isLazy__Lio_kaitai_struct_format_ClassSpec__T__Z = (function(inClass, attrName) {
|
|
20491
|
-
var
|
|
20552
|
+
var nonLocalReturnKey3 = new $c_O().init___();
|
|
20492
20553
|
try {
|
|
20493
20554
|
var this$1 = inClass.seq$1;
|
|
20494
20555
|
var these = this$1;
|
|
@@ -20498,7 +20559,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.isLazy__Lio_kaitai_struct_forma
|
|
|
20498
20559
|
var x = el.id$1;
|
|
20499
20560
|
var x$2 = new $c_Lio_kaitai_struct_format_NamedIdentifier().init___T(attrName);
|
|
20500
20561
|
if (((x !== null) && x.equals__O__Z(x$2))) {
|
|
20501
|
-
throw new $c_sr_NonLocalReturnControl$mcZ$sp().init___O__Z(
|
|
20562
|
+
throw new $c_sr_NonLocalReturnControl$mcZ$sp().init___O__Z(nonLocalReturnKey3, false)
|
|
20502
20563
|
};
|
|
20503
20564
|
var this$2 = these;
|
|
20504
20565
|
these = this$2.tail__sci_List()
|
|
@@ -20511,7 +20572,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.isLazy__Lio_kaitai_struct_forma
|
|
|
20511
20572
|
var x$1 = el$3.id$1;
|
|
20512
20573
|
var x$2$1 = new $c_Lio_kaitai_struct_format_NamedIdentifier().init___T(attrName);
|
|
20513
20574
|
if (((x$1 !== null) && x$1.equals__O__Z(x$2$1))) {
|
|
20514
|
-
throw new $c_sr_NonLocalReturnControl$mcZ$sp().init___O__Z(
|
|
20575
|
+
throw new $c_sr_NonLocalReturnControl$mcZ$sp().init___O__Z(nonLocalReturnKey3, false)
|
|
20515
20576
|
};
|
|
20516
20577
|
var this$4 = these$1;
|
|
20517
20578
|
these$1 = this$4.tail__sci_List()
|
|
@@ -20529,7 +20590,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.isLazy__Lio_kaitai_struct_forma
|
|
|
20529
20590
|
} catch (e) {
|
|
20530
20591
|
if ((e instanceof $c_sr_NonLocalReturnControl)) {
|
|
20531
20592
|
var ex = $as_sr_NonLocalReturnControl(e);
|
|
20532
|
-
if ((ex.key$2 ===
|
|
20593
|
+
if ((ex.key$2 === nonLocalReturnKey3)) {
|
|
20533
20594
|
return ex.value$mcZ$sp__Z()
|
|
20534
20595
|
} else {
|
|
20535
20596
|
throw ex
|
|
@@ -20592,7 +20653,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.resolveClassSpec__Lio_kaitai_st
|
|
|
20592
20653
|
}
|
|
20593
20654
|
});
|
|
20594
20655
|
$c_Lio_kaitai_struct_ClassTypeProvider.prototype.resolveMember__Lio_kaitai_struct_format_ClassSpec__T__Lio_kaitai_struct_format_MemberSpec = (function(inClass, attrName) {
|
|
20595
|
-
var
|
|
20656
|
+
var nonLocalReturnKey2 = new $c_O().init___();
|
|
20596
20657
|
try {
|
|
20597
20658
|
var this$1 = inClass.seq$1;
|
|
20598
20659
|
var these = this$1;
|
|
@@ -20602,7 +20663,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.resolveMember__Lio_kaitai_struc
|
|
|
20602
20663
|
var x = el.id$1;
|
|
20603
20664
|
var x$2 = new $c_Lio_kaitai_struct_format_NamedIdentifier().init___T(attrName);
|
|
20604
20665
|
if (((x !== null) && x.equals__O__Z(x$2))) {
|
|
20605
|
-
throw new $c_sr_NonLocalReturnControl().init___O__O(
|
|
20666
|
+
throw new $c_sr_NonLocalReturnControl().init___O__O(nonLocalReturnKey2, el)
|
|
20606
20667
|
};
|
|
20607
20668
|
var this$2 = these;
|
|
20608
20669
|
these = this$2.tail__sci_List()
|
|
@@ -20615,7 +20676,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.resolveMember__Lio_kaitai_struc
|
|
|
20615
20676
|
var x$1 = el$3.id$1;
|
|
20616
20677
|
var x$2$1 = new $c_Lio_kaitai_struct_format_NamedIdentifier().init___T(attrName);
|
|
20617
20678
|
if (((x$1 !== null) && x$1.equals__O__Z(x$2$1))) {
|
|
20618
|
-
throw new $c_sr_NonLocalReturnControl().init___O__O(
|
|
20679
|
+
throw new $c_sr_NonLocalReturnControl().init___O__O(nonLocalReturnKey2, el$3)
|
|
20619
20680
|
};
|
|
20620
20681
|
var this$4 = these$1;
|
|
20621
20682
|
these$1 = this$4.tail__sci_List()
|
|
@@ -20650,7 +20711,7 @@ $c_Lio_kaitai_struct_ClassTypeProvider.prototype.resolveMember__Lio_kaitai_struc
|
|
|
20650
20711
|
} catch (e) {
|
|
20651
20712
|
if ((e instanceof $c_sr_NonLocalReturnControl)) {
|
|
20652
20713
|
var ex = $as_sr_NonLocalReturnControl(e);
|
|
20653
|
-
if ((ex.key$2 ===
|
|
20714
|
+
if ((ex.key$2 === nonLocalReturnKey2)) {
|
|
20654
20715
|
return $as_Lio_kaitai_struct_format_MemberSpec(ex.value__O())
|
|
20655
20716
|
} else {
|
|
20656
20717
|
throw ex
|
|
@@ -20698,11 +20759,11 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileParseInstance__Lio_
|
|
|
20698
20759
|
}
|
|
20699
20760
|
});
|
|
20700
20761
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileEnum__Lio_kaitai_struct_format_EnumSpec__V = (function(enumSpec) {
|
|
20762
|
+
var this$1 = this.importList$1;
|
|
20763
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "import enum");
|
|
20701
20764
|
var jsx$1 = this.out$1;
|
|
20702
|
-
var
|
|
20703
|
-
jsx$1.puts__T__V((("
|
|
20704
|
-
this.out$1.inc__V();
|
|
20705
|
-
this.out$1.puts__T__V("return Enum(subcon,");
|
|
20765
|
+
var name = enumSpec.name$1;
|
|
20766
|
+
jsx$1.puts__T__V((("class " + $f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "")) + "(enum.IntEnum):"));
|
|
20706
20767
|
this.out$1.inc__V();
|
|
20707
20768
|
enumSpec.sortedSeq__sc_Seq().foreach__F1__V(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
|
|
20708
20769
|
return (function(x0$1$2) {
|
|
@@ -20712,17 +20773,20 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileEnum__Lio_kaitai_st
|
|
|
20712
20773
|
var lo = t.lo$2;
|
|
20713
20774
|
var hi = t.hi$2;
|
|
20714
20775
|
var valueSpec = $as_Lio_kaitai_struct_format_EnumValueSpec(x0$1.$$und2__O());
|
|
20715
|
-
$this.out$1
|
|
20776
|
+
var jsx$3 = $this.out$1;
|
|
20777
|
+
var jsx$2 = valueSpec.name$1;
|
|
20778
|
+
var this$3 = $m_s_math_BigInt$();
|
|
20779
|
+
var n = this$3.apply__J__s_math_BigInt(new $c_sjsr_RuntimeLong().init___I__I(lo, hi));
|
|
20780
|
+
var this$5 = n.bigInteger$3;
|
|
20781
|
+
jsx$3.puts__T__V(((jsx$2 + " = ") + $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$5)))
|
|
20716
20782
|
} else {
|
|
20717
20783
|
throw new $c_s_MatchError().init___O(x0$1)
|
|
20718
20784
|
}
|
|
20719
20785
|
})
|
|
20720
20786
|
})(this)));
|
|
20721
20787
|
this.out$1.dec__V();
|
|
20722
|
-
this.out$1
|
|
20723
|
-
this.
|
|
20724
|
-
var this$2 = this.out$1;
|
|
20725
|
-
this$2.sb$2.append__T__scm_StringBuilder("\n")
|
|
20788
|
+
var this$6 = this.out$1;
|
|
20789
|
+
this$6.sb$2.append__T__scm_StringBuilder("\n")
|
|
20726
20790
|
});
|
|
20727
20791
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.fixedEndianToStr__Lio_kaitai_struct_datatype_FixedEndian__T = (function(e) {
|
|
20728
20792
|
var x = $m_Lio_kaitai_struct_datatype_LittleEndian$();
|
|
@@ -20738,29 +20802,31 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.fixedEndianToStr__Lio_kait
|
|
|
20738
20802
|
}
|
|
20739
20803
|
});
|
|
20740
20804
|
$c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compile__Lio_kaitai_struct_CompileLog$SpecSuccess = (function() {
|
|
20741
|
-
this
|
|
20742
|
-
this.
|
|
20743
|
-
var this$
|
|
20744
|
-
|
|
20805
|
+
var this$1 = this.importList$1;
|
|
20806
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "from construct import *");
|
|
20807
|
+
var this$2 = this.importList$1;
|
|
20808
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "from construct.lib import *");
|
|
20745
20809
|
this.compileClass__Lio_kaitai_struct_format_ClassSpec__V(this.topClass$1);
|
|
20746
20810
|
var jsx$1 = this.out$1;
|
|
20747
|
-
var
|
|
20748
|
-
|
|
20749
|
-
jsx$1.puts__T__V(("_schema = " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$2, "", "__", "")));
|
|
20811
|
+
var name = this.topClass$1.name$1;
|
|
20812
|
+
jsx$1.puts__T__V(("_schema = " + $f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "")));
|
|
20750
20813
|
$m_sci_List$();
|
|
20751
|
-
var this$
|
|
20752
|
-
var this$
|
|
20753
|
-
var jsx$
|
|
20754
|
-
var this$
|
|
20755
|
-
var this$
|
|
20756
|
-
var
|
|
20814
|
+
var this$4 = this.topClass$1;
|
|
20815
|
+
var this$5 = this$4.name$1;
|
|
20816
|
+
var jsx$3 = this.outFileName__T__T($f_sc_TraversableOnce__mkString__T__T__T__T(this$5, "", "::", ""));
|
|
20817
|
+
var this$6 = this.importList$1;
|
|
20818
|
+
var this$7 = this$6.list$1.toList__sci_List();
|
|
20819
|
+
var jsx$2 = $f_sc_TraversableOnce__mkString__T__T__T__T(this$7, "", "\n", "");
|
|
20820
|
+
var this$8 = this.out$1;
|
|
20821
|
+
var this$9 = this$8.sb$2;
|
|
20822
|
+
var array = [new $c_Lio_kaitai_struct_CompileLog$FileSuccess().init___T__T(jsx$3, ((jsx$2 + "\n\n") + this$9.underlying$5.java$lang$StringBuilder$$content$f))];
|
|
20757
20823
|
var i = (((-1) + $uI(array.length)) | 0);
|
|
20758
20824
|
var result = $m_sci_Nil$();
|
|
20759
20825
|
while ((i >= 0)) {
|
|
20760
|
-
var this$
|
|
20826
|
+
var this$13 = result;
|
|
20761
20827
|
var index = i;
|
|
20762
20828
|
var x = array[index];
|
|
20763
|
-
result = new $c_sci_$colon$colon().init___O__sci_List(x, this$
|
|
20829
|
+
result = new $c_sci_$colon$colon().init___O__sci_List(x, this$13);
|
|
20764
20830
|
i = (((-1) + i) | 0)
|
|
20765
20831
|
};
|
|
20766
20832
|
return new $c_Lio_kaitai_struct_CompileLog$SpecSuccess().init___T__sci_List("", result)
|
|
@@ -20939,8 +21005,8 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.compileClass__Lio_kaitai_s
|
|
|
20939
21005
|
})
|
|
20940
21006
|
})(this)));
|
|
20941
21007
|
var jsx$1 = this.out$1;
|
|
20942
|
-
var
|
|
20943
|
-
jsx$1.puts__T__V(($f_sc_TraversableOnce__mkString__T__T__T__T(
|
|
21008
|
+
var name = cs.name$1;
|
|
21009
|
+
jsx$1.puts__T__V(($f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "") + " = Struct("));
|
|
20944
21010
|
this.out$1.inc__V();
|
|
20945
21011
|
this.provider$1.nowClass$1 = cs;
|
|
20946
21012
|
var this$3 = cs.seq$1;
|
|
@@ -21118,9 +21184,8 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.typeToStr__Lio_kaitai_stru
|
|
|
21118
21184
|
}
|
|
21119
21185
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream)) {
|
|
21120
21186
|
var x9 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeInstream(dataType);
|
|
21121
|
-
var
|
|
21122
|
-
|
|
21123
|
-
return (("LazyBound(lambda: " + $f_sc_TraversableOnce__mkString__T__T__T__T(this$1, "", "__", "")) + ")")
|
|
21187
|
+
var name = $as_Lio_kaitai_struct_format_ClassSpec(x9.classSpec$3.get__O()).name$1;
|
|
21188
|
+
return (("LazyBound(lambda: " + $f_sc_TraversableOnce__mkString__T__T__T__T(name, "", "__", "")) + ")")
|
|
21124
21189
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes)) {
|
|
21125
21190
|
var x10 = $as_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes(dataType);
|
|
21126
21191
|
var x1$3 = x10.bytes$4;
|
|
@@ -21128,17 +21193,16 @@ $c_Lio_kaitai_struct_ConstructClassCompiler.prototype.typeToStr__Lio_kaitai_stru
|
|
|
21128
21193
|
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$BytesLimitType(x1$3);
|
|
21129
21194
|
var size = x2$2.size$2;
|
|
21130
21195
|
var jsx$1 = this.translator$1.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(size);
|
|
21131
|
-
var
|
|
21132
|
-
|
|
21133
|
-
return (((("FixedSized(" + jsx$1) + ", LazyBound(lambda: ") + $f_sc_TraversableOnce__mkString__T__T__T__T(this$2, "", "__", "")) + "))")
|
|
21196
|
+
var name$1 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).name$1;
|
|
21197
|
+
return (((("FixedSized(" + jsx$1) + ", LazyBound(lambda: ") + $f_sc_TraversableOnce__mkString__T__T__T__T(name$1, "", "__", "")) + "))")
|
|
21134
21198
|
} else {
|
|
21135
21199
|
return "???"
|
|
21136
21200
|
}
|
|
21137
21201
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
21138
21202
|
var x11 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(dataType);
|
|
21139
|
-
var
|
|
21140
|
-
var
|
|
21141
|
-
return ((($f_sc_TraversableOnce__mkString__T__T__T__T(
|
|
21203
|
+
var jsx$2 = this.typeToStr__Lio_kaitai_struct_datatype_DataType__T(x11.basedOn$1);
|
|
21204
|
+
var name$2 = $as_Lio_kaitai_struct_format_EnumSpec(x11.enumSpec$1.get__O()).name$1;
|
|
21205
|
+
return (((("Enum(" + jsx$2) + ", ") + $f_sc_TraversableOnce__mkString__T__T__T__T(name$2, "", "__", "")) + ")")
|
|
21142
21206
|
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
21143
21207
|
var x12 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(dataType);
|
|
21144
21208
|
return this.attrSwitchType__Lio_kaitai_struct_datatype_DataType$SwitchType__T(x12)
|
|
@@ -29615,6 +29679,38 @@ $c_Lio_kaitai_struct_languages_CppCompiler$.prototype.combineSwitchType__Lio_kai
|
|
|
29615
29679
|
})(this))).values__sc_Iterable());
|
|
29616
29680
|
return (st.isOwning$2 ? ct1 : ct1.asNonOwning__Lio_kaitai_struct_datatype_DataType())
|
|
29617
29681
|
});
|
|
29682
|
+
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
29683
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
29684
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
29685
|
+
var name = x2.name$2;
|
|
29686
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
29687
|
+
return name
|
|
29688
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
29689
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
29690
|
+
var name$2 = x3.name$2;
|
|
29691
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
29692
|
+
return name$2
|
|
29693
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
29694
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
29695
|
+
var idx = x4.idx$2;
|
|
29696
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
29697
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
29698
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
29699
|
+
var name$3 = x5.name$2;
|
|
29700
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
29701
|
+
return name$3
|
|
29702
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
29703
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
29704
|
+
var inner = x6.innerId$2;
|
|
29705
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner))
|
|
29706
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_IoStorageIdentifier)) {
|
|
29707
|
+
var x7 = $as_Lio_kaitai_struct_format_IoStorageIdentifier(id);
|
|
29708
|
+
var inner$2 = x7.innerId$2;
|
|
29709
|
+
return ("_io_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner$2))
|
|
29710
|
+
} else {
|
|
29711
|
+
throw new $c_s_MatchError().init___O(id)
|
|
29712
|
+
}
|
|
29713
|
+
});
|
|
29618
29714
|
$c_Lio_kaitai_struct_languages_CppCompiler$.prototype.type2class__T__T = (function(name) {
|
|
29619
29715
|
return (($m_Lio_kaitai_struct_Utils$(), name) + "_t")
|
|
29620
29716
|
});
|
|
@@ -33812,9 +33908,6 @@ function $h_Lio_kaitai_struct_languages_JavaCompiler$() {
|
|
|
33812
33908
|
/*<skip>*/
|
|
33813
33909
|
}
|
|
33814
33910
|
$h_Lio_kaitai_struct_languages_JavaCompiler$.prototype = $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype;
|
|
33815
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.init___ = (function() {
|
|
33816
|
-
return this
|
|
33817
|
-
});
|
|
33818
33911
|
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T = (function(attrType) {
|
|
33819
33912
|
_kaitaiType2JavaTypePrim: while (true) {
|
|
33820
33913
|
var rc74 = false;
|
|
@@ -33998,6 +34091,12 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypePrim__
|
|
|
33998
34091
|
throw new $c_s_MatchError().init___O(x1)
|
|
33999
34092
|
}
|
|
34000
34093
|
});
|
|
34094
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.init___ = (function() {
|
|
34095
|
+
return this
|
|
34096
|
+
});
|
|
34097
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__T = (function(attrType, isNullable) {
|
|
34098
|
+
return (isNullable ? this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(attrType) : this.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType))
|
|
34099
|
+
});
|
|
34001
34100
|
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.types2class__sci_List__T = (function(names) {
|
|
34002
34101
|
var f = (function($this) {
|
|
34003
34102
|
return (function(x$2) {
|
|
@@ -34038,12 +34137,34 @@ $c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.types2class__sci_List__T
|
|
|
34038
34137
|
};
|
|
34039
34138
|
return $as_sc_TraversableOnce(jsx$1).mkString__T__T(".")
|
|
34040
34139
|
});
|
|
34041
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__T = (function(attrType, isNullable) {
|
|
34042
|
-
return (isNullable ? this.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(attrType) : this.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType))
|
|
34043
|
-
});
|
|
34044
34140
|
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
34045
34141
|
return new $c_Lio_kaitai_struct_languages_JavaCompiler().init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig(tp, config)
|
|
34046
34142
|
});
|
|
34143
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
34144
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
34145
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
34146
|
+
var name = x2.name$2;
|
|
34147
|
+
return name
|
|
34148
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
34149
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
34150
|
+
var name$2 = x3.name$2;
|
|
34151
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
34152
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
34153
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
34154
|
+
var idx = x4.idx$2;
|
|
34155
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
34156
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
34157
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
34158
|
+
var name$3 = x5.name$2;
|
|
34159
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3)
|
|
34160
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
34161
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
34162
|
+
var innerId = x6.innerId$2;
|
|
34163
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
34164
|
+
} else {
|
|
34165
|
+
throw new $c_s_MatchError().init___O(id)
|
|
34166
|
+
}
|
|
34167
|
+
});
|
|
34047
34168
|
$c_Lio_kaitai_struct_languages_JavaCompiler$.prototype.kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T = (function(attrType) {
|
|
34048
34169
|
_kaitaiType2JavaTypeBoxed: while (true) {
|
|
34049
34170
|
var rc72 = false;
|
|
@@ -34268,6 +34389,33 @@ $c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.init___ = (function() {
|
|
|
34268
34389
|
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
34269
34390
|
return new $c_Lio_kaitai_struct_languages_RubyCompiler().init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig(tp, config)
|
|
34270
34391
|
});
|
|
34392
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
34393
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
34394
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
34395
|
+
var name = x2.name$2;
|
|
34396
|
+
return name
|
|
34397
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
34398
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
34399
|
+
var name$2 = x3.name$2;
|
|
34400
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
34401
|
+
return name$2
|
|
34402
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
34403
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
34404
|
+
var idx = x4.idx$2;
|
|
34405
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
34406
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
34407
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
34408
|
+
var name$3 = x5.name$2;
|
|
34409
|
+
$m_Lio_kaitai_struct_Utils$();
|
|
34410
|
+
return name$3
|
|
34411
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
34412
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
34413
|
+
var inner = x6.innerId$2;
|
|
34414
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner))
|
|
34415
|
+
} else {
|
|
34416
|
+
throw new $c_s_MatchError().init___O(id)
|
|
34417
|
+
}
|
|
34418
|
+
});
|
|
34271
34419
|
$c_Lio_kaitai_struct_languages_RubyCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
34272
34420
|
var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
|
|
34273
34421
|
if ((x === err)) {
|
|
@@ -34561,7 +34709,7 @@ function $f_Lio_kaitai_struct_languages_components_GoReads__handleAssignment__Li
|
|
|
34561
34709
|
if ((x === rep)) {
|
|
34562
34710
|
$thiz.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V(id, expr)
|
|
34563
34711
|
} else if ((rep instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
|
|
34564
|
-
$thiz.
|
|
34712
|
+
$thiz.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__V(id, expr)
|
|
34565
34713
|
} else if ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil)) {
|
|
34566
34714
|
$thiz.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Z__V(id, expr, isRaw)
|
|
34567
34715
|
} else {
|
|
@@ -41004,6 +41152,33 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.ksErrorName__Lio_kaitai
|
|
|
41004
41152
|
return err.name__T()
|
|
41005
41153
|
}
|
|
41006
41154
|
});
|
|
41155
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
41156
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
41157
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
41158
|
+
var name = x2.name$2;
|
|
41159
|
+
return ("M" + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name))
|
|
41160
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
41161
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
41162
|
+
var name$2 = x3.name$2;
|
|
41163
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$2)
|
|
41164
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
41165
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
41166
|
+
var idx = x4.idx$2;
|
|
41167
|
+
var x = $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1;
|
|
41168
|
+
var this$2 = new $c_sci_StringOps().init___T(x);
|
|
41169
|
+
return (($f_sci_StringLike__capitalize__T(this$2) + "_") + idx)
|
|
41170
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
41171
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
41172
|
+
var name$3 = x5.name$2;
|
|
41173
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$3)
|
|
41174
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
41175
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
41176
|
+
var innerId = x6.innerId$2;
|
|
41177
|
+
return ("M_Raw" + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
41178
|
+
} else {
|
|
41179
|
+
throw new $c_s_MatchError().init___O(id)
|
|
41180
|
+
}
|
|
41181
|
+
});
|
|
41007
41182
|
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.types2class__sc_Iterable__T = (function(names) {
|
|
41008
41183
|
var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
|
|
41009
41184
|
return (function(name$2) {
|
|
@@ -41287,9 +41462,60 @@ $c_Lio_kaitai_struct_languages_GoCompiler$.prototype.kaitaiType2NativeType__Lio_
|
|
|
41287
41462
|
$c_Lio_kaitai_struct_languages_GoCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
41288
41463
|
return new $c_Lio_kaitai_struct_languages_GoCompiler().init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig(tp, config)
|
|
41289
41464
|
});
|
|
41465
|
+
$c_Lio_kaitai_struct_languages_GoCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
41466
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
41467
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
41468
|
+
var name = x2.name$2;
|
|
41469
|
+
return name
|
|
41470
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
41471
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
41472
|
+
var name$2 = x3.name$2;
|
|
41473
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$2)
|
|
41474
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
41475
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
41476
|
+
var idx = x4.idx$2;
|
|
41477
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
41478
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
41479
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
41480
|
+
var name$3 = x5.name$2;
|
|
41481
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3)
|
|
41482
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
41483
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
41484
|
+
var innerId = x6.innerId$2;
|
|
41485
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
41486
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_IoStorageIdentifier)) {
|
|
41487
|
+
var x7 = $as_Lio_kaitai_struct_format_IoStorageIdentifier(id);
|
|
41488
|
+
var innerId$2 = x7.innerId$2;
|
|
41489
|
+
return ("_io_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId$2))
|
|
41490
|
+
} else {
|
|
41491
|
+
throw new $c_s_MatchError().init___O(id)
|
|
41492
|
+
}
|
|
41493
|
+
});
|
|
41290
41494
|
$c_Lio_kaitai_struct_languages_GoCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
41291
41495
|
return ("kaitai." + err.name__T())
|
|
41292
41496
|
});
|
|
41497
|
+
$c_Lio_kaitai_struct_languages_GoCompiler$.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
41498
|
+
var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
41499
|
+
if (x.equals__O__Z(id)) {
|
|
41500
|
+
return "_IO"
|
|
41501
|
+
} else {
|
|
41502
|
+
var x$3 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
41503
|
+
if (x$3.equals__O__Z(id)) {
|
|
41504
|
+
return "_Root"
|
|
41505
|
+
} else {
|
|
41506
|
+
var x$5 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
41507
|
+
if (x$5.equals__O__Z(id)) {
|
|
41508
|
+
return "_Parent"
|
|
41509
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
41510
|
+
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
41511
|
+
var name = x2.name$2;
|
|
41512
|
+
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
41513
|
+
} else {
|
|
41514
|
+
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
41515
|
+
}
|
|
41516
|
+
}
|
|
41517
|
+
}
|
|
41518
|
+
});
|
|
41293
41519
|
var $d_Lio_kaitai_struct_languages_GoCompiler$ = new $TypeData().initClass({
|
|
41294
41520
|
Lio_kaitai_struct_languages_GoCompiler$: 0
|
|
41295
41521
|
}, false, "io.kaitai.struct.languages.GoCompiler$", {
|
|
@@ -41365,6 +41591,31 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.types2class__sci_Li
|
|
|
41365
41591
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
41366
41592
|
return new $c_Lio_kaitai_struct_languages_JavaScriptCompiler().init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig(tp, config)
|
|
41367
41593
|
});
|
|
41594
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
41595
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
41596
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
41597
|
+
var name = x2.name$2;
|
|
41598
|
+
return name
|
|
41599
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
41600
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
41601
|
+
var name$2 = x3.name$2;
|
|
41602
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
41603
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
41604
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
41605
|
+
var idx = x4.idx$2;
|
|
41606
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
41607
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
41608
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
41609
|
+
var name$3 = x5.name$2;
|
|
41610
|
+
return ("_m_" + $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3))
|
|
41611
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
41612
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
41613
|
+
var innerId = x6.innerId$2;
|
|
41614
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
41615
|
+
} else {
|
|
41616
|
+
throw new $c_s_MatchError().init___O(id)
|
|
41617
|
+
}
|
|
41618
|
+
});
|
|
41368
41619
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
41369
41620
|
var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
|
|
41370
41621
|
if ((x === err)) {
|
|
@@ -41373,6 +41624,15 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.ksErrorName__Lio_ka
|
|
|
41373
41624
|
return ("KaitaiStream." + err.name__T())
|
|
41374
41625
|
}
|
|
41375
41626
|
});
|
|
41627
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler$.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
41628
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
41629
|
+
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
41630
|
+
var name = x2.name$2;
|
|
41631
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name)
|
|
41632
|
+
} else {
|
|
41633
|
+
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
41634
|
+
}
|
|
41635
|
+
});
|
|
41376
41636
|
var $d_Lio_kaitai_struct_languages_JavaScriptCompiler$ = new $TypeData().initClass({
|
|
41377
41637
|
Lio_kaitai_struct_languages_JavaScriptCompiler$: 0
|
|
41378
41638
|
}, false, "io.kaitai.struct.languages.JavaScriptCompiler$", {
|
|
@@ -41448,6 +41708,40 @@ $c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.types2class__sci_List__T =
|
|
|
41448
41708
|
$c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
41449
41709
|
return new $c_Lio_kaitai_struct_languages_LuaCompiler().init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig(tp, config)
|
|
41450
41710
|
});
|
|
41711
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
41712
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
41713
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
41714
|
+
var name = x2.name$2;
|
|
41715
|
+
return name
|
|
41716
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
41717
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
41718
|
+
var name$2 = x3.name$2;
|
|
41719
|
+
return name$2
|
|
41720
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
41721
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
41722
|
+
var idx = x4.idx$2;
|
|
41723
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
41724
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
41725
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
41726
|
+
var name$3 = x5.name$2;
|
|
41727
|
+
return ("_m_" + name$3)
|
|
41728
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
41729
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
41730
|
+
var innerId = x6.innerId$2;
|
|
41731
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
41732
|
+
} else {
|
|
41733
|
+
throw new $c_s_MatchError().init___O(id)
|
|
41734
|
+
}
|
|
41735
|
+
});
|
|
41736
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler$.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
41737
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
41738
|
+
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
41739
|
+
var name = x2.name$2;
|
|
41740
|
+
return name
|
|
41741
|
+
} else {
|
|
41742
|
+
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
41743
|
+
}
|
|
41744
|
+
});
|
|
41451
41745
|
var $d_Lio_kaitai_struct_languages_LuaCompiler$ = new $TypeData().initClass({
|
|
41452
41746
|
Lio_kaitai_struct_languages_LuaCompiler$: 0
|
|
41453
41747
|
}, false, "io.kaitai.struct.languages.LuaCompiler$", {
|
|
@@ -41851,6 +42145,31 @@ $c_Lio_kaitai_struct_languages_PHPCompiler$.prototype.init___ = (function() {
|
|
|
41851
42145
|
$c_Lio_kaitai_struct_languages_PHPCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
41852
42146
|
return new $c_Lio_kaitai_struct_languages_PHPCompiler().init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig(tp, config)
|
|
41853
42147
|
});
|
|
42148
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
42149
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
42150
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
42151
|
+
var name = x2.name$2;
|
|
42152
|
+
return name
|
|
42153
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
42154
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
42155
|
+
var name$2 = x3.name$2;
|
|
42156
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
42157
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
42158
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
42159
|
+
var idx = x4.idx$2;
|
|
42160
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
42161
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
42162
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
42163
|
+
var name$3 = x5.name$2;
|
|
42164
|
+
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3)
|
|
42165
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
42166
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
42167
|
+
var innerId = x6.innerId$2;
|
|
42168
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
42169
|
+
} else {
|
|
42170
|
+
throw new $c_s_MatchError().init___O(id)
|
|
42171
|
+
}
|
|
42172
|
+
});
|
|
41854
42173
|
$c_Lio_kaitai_struct_languages_PHPCompiler$.prototype.types2classRel__sci_List__T = (function(names) {
|
|
41855
42174
|
var f = (function($this) {
|
|
41856
42175
|
return (function(name$2) {
|
|
@@ -41975,6 +42294,31 @@ $c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.kstreamName__T = (functio
|
|
|
41975
42294
|
$c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.kstructName__T = (function() {
|
|
41976
42295
|
return "IO::KaitaiStruct::Struct"
|
|
41977
42296
|
});
|
|
42297
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
42298
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
42299
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
42300
|
+
var name = x2.name$2;
|
|
42301
|
+
return name
|
|
42302
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
42303
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
42304
|
+
var name$2 = x3.name$2;
|
|
42305
|
+
return name$2
|
|
42306
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
42307
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
42308
|
+
var idx = x4.idx$2;
|
|
42309
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
42310
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
42311
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
42312
|
+
var name$3 = x5.name$2;
|
|
42313
|
+
return name$3
|
|
42314
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
42315
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
42316
|
+
var inner = x6.innerId$2;
|
|
42317
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner))
|
|
42318
|
+
} else {
|
|
42319
|
+
throw new $c_s_MatchError().init___O(id)
|
|
42320
|
+
}
|
|
42321
|
+
});
|
|
41978
42322
|
var $d_Lio_kaitai_struct_languages_PerlCompiler$ = new $TypeData().initClass({
|
|
41979
42323
|
Lio_kaitai_struct_languages_PerlCompiler$: 0
|
|
41980
42324
|
}, false, "io.kaitai.struct.languages.PerlCompiler$", {
|
|
@@ -42050,6 +42394,31 @@ $c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.types2class__sci_List__
|
|
|
42050
42394
|
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.getCompiler__Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_languages_components_LanguageCompiler = (function(tp, config) {
|
|
42051
42395
|
return new $c_Lio_kaitai_struct_languages_PythonCompiler().init___Lio_kaitai_struct_ClassTypeProvider__Lio_kaitai_struct_RuntimeConfig(tp, config)
|
|
42052
42396
|
});
|
|
42397
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
42398
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
42399
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
42400
|
+
var name = x2.name$2;
|
|
42401
|
+
return name
|
|
42402
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
42403
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
42404
|
+
var name$2 = x3.name$2;
|
|
42405
|
+
return name$2
|
|
42406
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
42407
|
+
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
42408
|
+
var idx = x4.idx$2;
|
|
42409
|
+
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
42410
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
42411
|
+
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
42412
|
+
var name$3 = x5.name$2;
|
|
42413
|
+
return ("_m_" + name$3)
|
|
42414
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
42415
|
+
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
42416
|
+
var innerId = x6.innerId$2;
|
|
42417
|
+
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
42418
|
+
} else {
|
|
42419
|
+
throw new $c_s_MatchError().init___O(id)
|
|
42420
|
+
}
|
|
42421
|
+
});
|
|
42053
42422
|
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
42054
42423
|
var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
|
|
42055
42424
|
if ((x === err)) {
|
|
@@ -42058,6 +42427,15 @@ $c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.ksErrorName__Lio_kaitai
|
|
|
42058
42427
|
return ("kaitaistruct." + err.name__T())
|
|
42059
42428
|
}
|
|
42060
42429
|
});
|
|
42430
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler$.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
42431
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
42432
|
+
var x2 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
42433
|
+
var name = x2.name$2;
|
|
42434
|
+
return name
|
|
42435
|
+
} else {
|
|
42436
|
+
return this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
42437
|
+
}
|
|
42438
|
+
});
|
|
42061
42439
|
var $d_Lio_kaitai_struct_languages_PythonCompiler$ = new $TypeData().initClass({
|
|
42062
42440
|
Lio_kaitai_struct_languages_PythonCompiler$: 0
|
|
42063
42441
|
}, false, "io.kaitai.struct.languages.PythonCompiler$", {
|
|
@@ -48393,6 +48771,82 @@ var $d_Lio_kaitai_struct_exprlang_Ast$expr$IntNum = new $TypeData().initClass({
|
|
|
48393
48771
|
});
|
|
48394
48772
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum.prototype.$classData = $d_Lio_kaitai_struct_exprlang_Ast$expr$IntNum;
|
|
48395
48773
|
/** @constructor */
|
|
48774
|
+
function $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName() {
|
|
48775
|
+
$c_O.call(this);
|
|
48776
|
+
this.id$1 = null
|
|
48777
|
+
}
|
|
48778
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype = new $h_O();
|
|
48779
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.constructor = $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName;
|
|
48780
|
+
/** @constructor */
|
|
48781
|
+
function $h_Lio_kaitai_struct_exprlang_Ast$expr$InternalName() {
|
|
48782
|
+
/*<skip>*/
|
|
48783
|
+
}
|
|
48784
|
+
$h_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype = $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype;
|
|
48785
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.productPrefix__T = (function() {
|
|
48786
|
+
return "InternalName"
|
|
48787
|
+
});
|
|
48788
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.productArity__I = (function() {
|
|
48789
|
+
return 1
|
|
48790
|
+
});
|
|
48791
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.equals__O__Z = (function(x$1) {
|
|
48792
|
+
if ((this === x$1)) {
|
|
48793
|
+
return true
|
|
48794
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName)) {
|
|
48795
|
+
var InternalName$1 = $as_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(x$1);
|
|
48796
|
+
var x = this.id$1;
|
|
48797
|
+
var x$2 = InternalName$1.id$1;
|
|
48798
|
+
return ((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))
|
|
48799
|
+
} else {
|
|
48800
|
+
return false
|
|
48801
|
+
}
|
|
48802
|
+
});
|
|
48803
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.productElement__I__O = (function(x$1) {
|
|
48804
|
+
switch (x$1) {
|
|
48805
|
+
case 0: {
|
|
48806
|
+
return this.id$1;
|
|
48807
|
+
break
|
|
48808
|
+
}
|
|
48809
|
+
default: {
|
|
48810
|
+
throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
|
|
48811
|
+
}
|
|
48812
|
+
}
|
|
48813
|
+
});
|
|
48814
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.init___Lio_kaitai_struct_format_Identifier = (function(id) {
|
|
48815
|
+
this.id$1 = id;
|
|
48816
|
+
return this
|
|
48817
|
+
});
|
|
48818
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.toString__T = (function() {
|
|
48819
|
+
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
48820
|
+
});
|
|
48821
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.hashCode__I = (function() {
|
|
48822
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
48823
|
+
return this$2.productHash__s_Product__I__I(this, (-889275714))
|
|
48824
|
+
});
|
|
48825
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.productIterator__sc_Iterator = (function() {
|
|
48826
|
+
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
48827
|
+
});
|
|
48828
|
+
function $as_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(obj) {
|
|
48829
|
+
return (((obj instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.exprlang.Ast$expr$InternalName"))
|
|
48830
|
+
}
|
|
48831
|
+
function $isArrayOf_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(obj, depth) {
|
|
48832
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_exprlang_Ast$expr$InternalName)))
|
|
48833
|
+
}
|
|
48834
|
+
function $asArrayOf_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(obj, depth) {
|
|
48835
|
+
return (($isArrayOf_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.Ast$expr$InternalName;", depth))
|
|
48836
|
+
}
|
|
48837
|
+
var $d_Lio_kaitai_struct_exprlang_Ast$expr$InternalName = new $TypeData().initClass({
|
|
48838
|
+
Lio_kaitai_struct_exprlang_Ast$expr$InternalName: 0
|
|
48839
|
+
}, false, "io.kaitai.struct.exprlang.Ast$expr$InternalName", {
|
|
48840
|
+
Lio_kaitai_struct_exprlang_Ast$expr$InternalName: 1,
|
|
48841
|
+
O: 1,
|
|
48842
|
+
Lio_kaitai_struct_exprlang_Ast$expr: 1,
|
|
48843
|
+
s_Product: 1,
|
|
48844
|
+
s_Equals: 1,
|
|
48845
|
+
s_Serializable: 1,
|
|
48846
|
+
Ljava_io_Serializable: 1
|
|
48847
|
+
});
|
|
48848
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName.prototype.$classData = $d_Lio_kaitai_struct_exprlang_Ast$expr$InternalName;
|
|
48849
|
+
/** @constructor */
|
|
48396
48850
|
function $c_Lio_kaitai_struct_exprlang_Ast$expr$List() {
|
|
48397
48851
|
$c_O.call(this);
|
|
48398
48852
|
this.elts$1 = null
|
|
@@ -62699,6 +63153,9 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.byteSizeOfValue__T__Li
|
|
|
62699
63153
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
62700
63154
|
return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
62701
63155
|
});
|
|
63156
|
+
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
63157
|
+
$m_s_Predef$().$$qmark$qmark$qmark__sr_Nothing$()
|
|
63158
|
+
});
|
|
62702
63159
|
$c_Lio_kaitai_struct_translators_BaseTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
62703
63160
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
62704
63161
|
});
|
|
@@ -62892,10 +63349,17 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
62892
63349
|
return ((name.name$1 === $m_Lio_kaitai_struct_format_Identifier$().SIZEOF$1) ? this.byteSizeOfClassSpec__Lio_kaitai_struct_format_ClassSpec__T(this.provider$2.nowClass$1) : this.doLocalName__T__T(name.name$1))
|
|
62893
63350
|
}
|
|
62894
63351
|
};
|
|
63352
|
+
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName)) {
|
|
63353
|
+
var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(v);
|
|
63354
|
+
var id$2 = x9.id$1;
|
|
63355
|
+
if ((id$2 !== null)) {
|
|
63356
|
+
return this.doInternalName__Lio_kaitai_struct_format_Identifier__T(id$2)
|
|
63357
|
+
}
|
|
63358
|
+
};
|
|
62895
63359
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
|
|
62896
|
-
var
|
|
62897
|
-
var op =
|
|
62898
|
-
var inner =
|
|
63360
|
+
var x10 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(v);
|
|
63361
|
+
var op = x10.op$1;
|
|
63362
|
+
var inner = x10.operand$1;
|
|
62899
63363
|
if ((op !== null)) {
|
|
62900
63364
|
if ((inner !== null)) {
|
|
62901
63365
|
var opStr = this.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(op);
|
|
@@ -62911,10 +63375,10 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
62911
63375
|
}
|
|
62912
63376
|
};
|
|
62913
63377
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare)) {
|
|
62914
|
-
var
|
|
62915
|
-
var left =
|
|
62916
|
-
var op$2 =
|
|
62917
|
-
var right =
|
|
63378
|
+
var x11 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Compare(v);
|
|
63379
|
+
var left = x11.left$1;
|
|
63380
|
+
var op$2 = x11.ops$1;
|
|
63381
|
+
var right = x11.right$1;
|
|
62918
63382
|
if ((left !== null)) {
|
|
62919
63383
|
if ((op$2 !== null)) {
|
|
62920
63384
|
if ((right !== null)) {
|
|
@@ -62944,10 +63408,10 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
62944
63408
|
return this.doBytesCompareOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr__T(left, op$2, right)
|
|
62945
63409
|
};
|
|
62946
63410
|
if ((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
62947
|
-
var x18
|
|
63411
|
+
var x18 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(_1);
|
|
62948
63412
|
if ((_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$EnumType)) {
|
|
62949
63413
|
var x19$2 = $as_Lio_kaitai_struct_datatype_DataType$EnumType(_2);
|
|
62950
|
-
var et1Spec = $as_Lio_kaitai_struct_format_EnumSpec(x18
|
|
63414
|
+
var et1Spec = $as_Lio_kaitai_struct_format_EnumSpec(x18.enumSpec$1.get__O());
|
|
62951
63415
|
var et2Spec = $as_Lio_kaitai_struct_format_EnumSpec(x19$2.enumSpec$1.get__O());
|
|
62952
63416
|
if ((!((et1Spec === null) ? (et2Spec === null) : et1Spec.equals__O__Z(et2Spec)))) {
|
|
62953
63417
|
var this$1 = et1Spec.name$1;
|
|
@@ -62965,10 +63429,10 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
62965
63429
|
}
|
|
62966
63430
|
};
|
|
62967
63431
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp)) {
|
|
62968
|
-
var
|
|
62969
|
-
var left$2 =
|
|
62970
|
-
var op$3 =
|
|
62971
|
-
var right$2 =
|
|
63432
|
+
var x12 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BinOp(v);
|
|
63433
|
+
var left$2 = x12.left$1;
|
|
63434
|
+
var op$3 = x12.op$1;
|
|
63435
|
+
var right$2 = x12.right$1;
|
|
62972
63436
|
if ((left$2 !== null)) {
|
|
62973
63437
|
if ((op$3 !== null)) {
|
|
62974
63438
|
if ((right$2 !== null)) {
|
|
@@ -62998,9 +63462,9 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
62998
63462
|
}
|
|
62999
63463
|
};
|
|
63000
63464
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp)) {
|
|
63001
|
-
var
|
|
63002
|
-
var op$4 =
|
|
63003
|
-
var values =
|
|
63465
|
+
var x13 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp(v);
|
|
63466
|
+
var op$4 = x13.op$1;
|
|
63467
|
+
var values = x13.values$1;
|
|
63004
63468
|
if ((op$4 !== null)) {
|
|
63005
63469
|
if ((values !== null)) {
|
|
63006
63470
|
return $f_Lio_kaitai_struct_translators_CommonOps__doBooleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__sc_Seq__T(this, op$4, values)
|
|
@@ -63008,16 +63472,16 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
63008
63472
|
}
|
|
63009
63473
|
};
|
|
63010
63474
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IfExp)) {
|
|
63011
|
-
var
|
|
63012
|
-
var condition =
|
|
63013
|
-
var ifTrue =
|
|
63014
|
-
var ifFalse =
|
|
63475
|
+
var x14 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IfExp(v);
|
|
63476
|
+
var condition = x14.condition$1;
|
|
63477
|
+
var ifTrue = x14.ifTrue$1;
|
|
63478
|
+
var ifFalse = x14.ifFalse$1;
|
|
63015
63479
|
return this.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(condition, ifTrue, ifFalse)
|
|
63016
63480
|
};
|
|
63017
63481
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Subscript)) {
|
|
63018
|
-
var
|
|
63019
|
-
var container =
|
|
63020
|
-
var idx =
|
|
63482
|
+
var x15 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Subscript(v);
|
|
63483
|
+
var container = x15.value$1;
|
|
63484
|
+
var idx = x15.idx$1;
|
|
63021
63485
|
if ((container !== null)) {
|
|
63022
63486
|
if ((idx !== null)) {
|
|
63023
63487
|
var x1$6 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(idx);
|
|
@@ -63037,32 +63501,32 @@ $c_Lio_kaitai_struct_translators_BaseTranslator.prototype.translate__Lio_kaitai_
|
|
|
63037
63501
|
}
|
|
63038
63502
|
};
|
|
63039
63503
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Attribute)) {
|
|
63040
|
-
var
|
|
63041
|
-
return $as_T($f_Lio_kaitai_struct_translators_CommonMethods__translateAttribute__Lio_kaitai_struct_exprlang_Ast$expr$Attribute__O(this,
|
|
63504
|
+
var x33 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Attribute(v);
|
|
63505
|
+
return $as_T($f_Lio_kaitai_struct_translators_CommonMethods__translateAttribute__Lio_kaitai_struct_exprlang_Ast$expr$Attribute__O(this, x33))
|
|
63042
63506
|
};
|
|
63043
63507
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Call)) {
|
|
63044
|
-
var
|
|
63045
|
-
return $as_T($f_Lio_kaitai_struct_translators_CommonMethods__translateCall__Lio_kaitai_struct_exprlang_Ast$expr$Call__O(this,
|
|
63508
|
+
var x34 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Call(v);
|
|
63509
|
+
return $as_T($f_Lio_kaitai_struct_translators_CommonMethods__translateCall__Lio_kaitai_struct_exprlang_Ast$expr$Call__O(this, x34))
|
|
63046
63510
|
};
|
|
63047
63511
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$List)) {
|
|
63048
|
-
var
|
|
63049
|
-
var values$2 =
|
|
63512
|
+
var x16 = $as_Lio_kaitai_struct_exprlang_Ast$expr$List(v);
|
|
63513
|
+
var values$2 = x16.elts$1;
|
|
63050
63514
|
if ((values$2 !== null)) {
|
|
63051
63515
|
return $as_T($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doGuessArrayLiteral__sc_Seq__O(this, values$2))
|
|
63052
63516
|
}
|
|
63053
63517
|
};
|
|
63054
63518
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$CastToType)) {
|
|
63055
|
-
var
|
|
63056
|
-
return $as_T($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doCastOrArray__Lio_kaitai_struct_exprlang_Ast$expr$CastToType__O(this,
|
|
63519
|
+
var x36 = $as_Lio_kaitai_struct_exprlang_Ast$expr$CastToType(v);
|
|
63520
|
+
return $as_T($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doCastOrArray__Lio_kaitai_struct_exprlang_Ast$expr$CastToType__O(this, x36))
|
|
63057
63521
|
};
|
|
63058
63522
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType)) {
|
|
63059
|
-
var
|
|
63060
|
-
var typeName =
|
|
63523
|
+
var x17 = $as_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType(v);
|
|
63524
|
+
var typeName = x17.typeName$1;
|
|
63061
63525
|
return this.doByteSizeOfType__Lio_kaitai_struct_exprlang_Ast$typeId__T(typeName)
|
|
63062
63526
|
};
|
|
63063
63527
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BitSizeOfType)) {
|
|
63064
|
-
var
|
|
63065
|
-
var typeName$2 =
|
|
63528
|
+
var x18$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BitSizeOfType(v);
|
|
63529
|
+
var typeName$2 = x18$2.typeName$1;
|
|
63066
63530
|
return this.doBitSizeOfType__Lio_kaitai_struct_exprlang_Ast$typeId__T(typeName$2)
|
|
63067
63531
|
};
|
|
63068
63532
|
throw new $c_s_MatchError().init___O(v)
|
|
@@ -63361,12 +63825,12 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.doByteArrayLiteral__sc_S
|
|
|
63361
63825
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, num) {
|
|
63362
63826
|
return this.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult(value, num)
|
|
63363
63827
|
});
|
|
63364
|
-
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trEnumByLabel__sci_List__T__Lio_kaitai_struct_translators_ResultString = (function(enumTypeAbs, label) {
|
|
63365
|
-
return new $c_Lio_kaitai_struct_translators_ResultString().init___T($m_Lio_kaitai_struct_languages_GoCompiler$().enumToStr__sci_List__T__T(enumTypeAbs, label))
|
|
63366
|
-
});
|
|
63367
63828
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.asciiCharQuoteMap__sci_Map = (function() {
|
|
63368
63829
|
return this.asciiCharQuoteMap$2
|
|
63369
63830
|
});
|
|
63831
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trEnumByLabel__sci_List__T__Lio_kaitai_struct_translators_ResultString = (function(enumTypeAbs, label) {
|
|
63832
|
+
return new $c_Lio_kaitai_struct_translators_ResultString().init___T($m_Lio_kaitai_struct_languages_GoCompiler$().enumToStr__sci_List__T__T(enumTypeAbs, label))
|
|
63833
|
+
});
|
|
63370
63834
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult = (function(s) {
|
|
63371
63835
|
return new $c_Lio_kaitai_struct_translators_ResultString().init___T((("kaitai.StringReverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")"))
|
|
63372
63836
|
});
|
|
@@ -63661,6 +64125,23 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.doByteArrayNonLiteral__s
|
|
|
63661
64125
|
var this$1 = $m_sc_Seq$();
|
|
63662
64126
|
return new $c_Lio_kaitai_struct_translators_ResultString().init___T((("[]uint8{" + $as_sc_TraversableOnce(elts.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T(", ")) + "}"))
|
|
63663
64127
|
});
|
|
64128
|
+
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.trInternalName__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult = (function(id) {
|
|
64129
|
+
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
64130
|
+
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
64131
|
+
var name = x2.name$2;
|
|
64132
|
+
return this.trLocalName__T__Lio_kaitai_struct_translators_TranslatorResult(name)
|
|
64133
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
64134
|
+
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
64135
|
+
var name$2 = x3.name$2;
|
|
64136
|
+
return this.trLocalName__T__Lio_kaitai_struct_translators_TranslatorResult(name$2)
|
|
64137
|
+
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
64138
|
+
var x4 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
64139
|
+
var name$3 = x4.name$2;
|
|
64140
|
+
return this.trLocalName__T__Lio_kaitai_struct_translators_TranslatorResult(name$3)
|
|
64141
|
+
} else {
|
|
64142
|
+
return new $c_Lio_kaitai_struct_translators_ResultString().init___T(("this." + $m_Lio_kaitai_struct_languages_GoCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id)))
|
|
64143
|
+
}
|
|
64144
|
+
});
|
|
63664
64145
|
$c_Lio_kaitai_struct_translators_GoTranslator.prototype.bytesToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value, expr) {
|
|
63665
64146
|
return this.bytesToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_TranslatorResult(value, expr)
|
|
63666
64147
|
});
|
|
@@ -63737,10 +64218,17 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
63737
64218
|
return ((name.name$1 === $m_Lio_kaitai_struct_format_Identifier$().SIZEOF$1) ? this.byteSizeOfClassSpec__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_translators_TranslatorResult(this.provider$2.nowClass$1) : this.trLocalName__T__Lio_kaitai_struct_translators_TranslatorResult(name.name$1))
|
|
63738
64219
|
}
|
|
63739
64220
|
};
|
|
64221
|
+
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$InternalName)) {
|
|
64222
|
+
var x9 = $as_Lio_kaitai_struct_exprlang_Ast$expr$InternalName(v);
|
|
64223
|
+
var id$2 = x9.id$1;
|
|
64224
|
+
if ((id$2 !== null)) {
|
|
64225
|
+
return this.trInternalName__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult(id$2)
|
|
64226
|
+
}
|
|
64227
|
+
};
|
|
63740
64228
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
|
|
63741
|
-
var
|
|
63742
|
-
var op =
|
|
63743
|
-
var inner =
|
|
64229
|
+
var x10 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(v);
|
|
64230
|
+
var op = x10.op$1;
|
|
64231
|
+
var inner = x10.operand$1;
|
|
63744
64232
|
if ((op !== null)) {
|
|
63745
64233
|
if ((inner !== null)) {
|
|
63746
64234
|
var opStr = this.unaryOp__Lio_kaitai_struct_exprlang_Ast$unaryop__T(op);
|
|
@@ -63757,10 +64245,10 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
63757
64245
|
}
|
|
63758
64246
|
};
|
|
63759
64247
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare)) {
|
|
63760
|
-
var
|
|
63761
|
-
var left =
|
|
63762
|
-
var op$2 =
|
|
63763
|
-
var right =
|
|
64248
|
+
var x11 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Compare(v);
|
|
64249
|
+
var left = x11.left$1;
|
|
64250
|
+
var op$2 = x11.ops$1;
|
|
64251
|
+
var right = x11.right$1;
|
|
63764
64252
|
var _1 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(left);
|
|
63765
64253
|
var _2 = this.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(right);
|
|
63766
64254
|
if (((_1 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) && (_2 instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType))) {
|
|
@@ -63778,10 +64266,10 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
63778
64266
|
}
|
|
63779
64267
|
};
|
|
63780
64268
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp)) {
|
|
63781
|
-
var
|
|
63782
|
-
var left$2 =
|
|
63783
|
-
var op$3 =
|
|
63784
|
-
var right$2 =
|
|
64269
|
+
var x12 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BinOp(v);
|
|
64270
|
+
var left$2 = x12.left$1;
|
|
64271
|
+
var op$3 = x12.op$1;
|
|
64272
|
+
var right$2 = x12.right$1;
|
|
63785
64273
|
if ((left$2 !== null)) {
|
|
63786
64274
|
if ((op$3 !== null)) {
|
|
63787
64275
|
if ((right$2 !== null)) {
|
|
@@ -63811,49 +64299,49 @@ $c_Lio_kaitai_struct_translators_GoTranslator.prototype.translateExpr__Lio_kaita
|
|
|
63811
64299
|
}
|
|
63812
64300
|
};
|
|
63813
64301
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp)) {
|
|
63814
|
-
var
|
|
63815
|
-
var op$4 =
|
|
63816
|
-
var values =
|
|
64302
|
+
var x13 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp(v);
|
|
64303
|
+
var op$4 = x13.op$1;
|
|
64304
|
+
var values = x13.values$1;
|
|
63817
64305
|
return this.trBooleanOp__Lio_kaitai_struct_exprlang_Ast$boolop__sc_Seq__Lio_kaitai_struct_translators_ResultString(op$4, values)
|
|
63818
64306
|
};
|
|
63819
64307
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IfExp)) {
|
|
63820
|
-
var
|
|
63821
|
-
var condition =
|
|
63822
|
-
var ifTrue =
|
|
63823
|
-
var ifFalse =
|
|
64308
|
+
var x14 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IfExp(v);
|
|
64309
|
+
var condition = x14.condition$1;
|
|
64310
|
+
var ifTrue = x14.ifTrue$1;
|
|
64311
|
+
var ifFalse = x14.ifFalse$1;
|
|
63824
64312
|
return this.trIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultLocalVar(condition, ifTrue, ifFalse)
|
|
63825
64313
|
};
|
|
63826
64314
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Subscript)) {
|
|
63827
|
-
var
|
|
63828
|
-
var container =
|
|
63829
|
-
var idx =
|
|
64315
|
+
var x15 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Subscript(v);
|
|
64316
|
+
var container = x15.value$1;
|
|
64317
|
+
var idx = x15.idx$1;
|
|
63830
64318
|
return this.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_translators_ResultString(container, idx)
|
|
63831
64319
|
};
|
|
63832
64320
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Attribute)) {
|
|
63833
|
-
var
|
|
63834
|
-
return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateAttribute__Lio_kaitai_struct_exprlang_Ast$expr$Attribute__O(this,
|
|
64321
|
+
var x26 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Attribute(v);
|
|
64322
|
+
return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateAttribute__Lio_kaitai_struct_exprlang_Ast$expr$Attribute__O(this, x26))
|
|
63835
64323
|
};
|
|
63836
64324
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Call)) {
|
|
63837
|
-
var
|
|
63838
|
-
return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateCall__Lio_kaitai_struct_exprlang_Ast$expr$Call__O(this,
|
|
64325
|
+
var x27 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Call(v);
|
|
64326
|
+
return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonMethods__translateCall__Lio_kaitai_struct_exprlang_Ast$expr$Call__O(this, x27))
|
|
63839
64327
|
};
|
|
63840
64328
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$List)) {
|
|
63841
|
-
var
|
|
63842
|
-
var elts =
|
|
64329
|
+
var x16 = $as_Lio_kaitai_struct_exprlang_Ast$expr$List(v);
|
|
64330
|
+
var elts = x16.elts$1;
|
|
63843
64331
|
return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doGuessArrayLiteral__sc_Seq__O(this, elts))
|
|
63844
64332
|
};
|
|
63845
64333
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$CastToType)) {
|
|
63846
|
-
var
|
|
63847
|
-
return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doCastOrArray__Lio_kaitai_struct_exprlang_Ast$expr$CastToType__O(this,
|
|
64334
|
+
var x28 = $as_Lio_kaitai_struct_exprlang_Ast$expr$CastToType(v);
|
|
64335
|
+
return $as_Lio_kaitai_struct_translators_TranslatorResult($f_Lio_kaitai_struct_translators_CommonArraysAndCast__doCastOrArray__Lio_kaitai_struct_exprlang_Ast$expr$CastToType__O(this, x28))
|
|
63848
64336
|
};
|
|
63849
64337
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType)) {
|
|
63850
|
-
var
|
|
63851
|
-
var typeName =
|
|
64338
|
+
var x17 = $as_Lio_kaitai_struct_exprlang_Ast$expr$ByteSizeOfType(v);
|
|
64339
|
+
var typeName = x17.typeName$1;
|
|
63852
64340
|
return this.doByteSizeOfType__Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_translators_TranslatorResult(typeName)
|
|
63853
64341
|
};
|
|
63854
64342
|
if ((v instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BitSizeOfType)) {
|
|
63855
|
-
var
|
|
63856
|
-
var typeName$2 =
|
|
64343
|
+
var x18 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BitSizeOfType(v);
|
|
64344
|
+
var typeName$2 = x18.typeName$1;
|
|
63857
64345
|
return this.doBitSizeOfType__Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_translators_TranslatorResult(typeName$2)
|
|
63858
64346
|
};
|
|
63859
64347
|
throw new $c_s_MatchError().init___O(v)
|
|
@@ -65794,6 +66282,9 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.enumClass__sci_List_
|
|
|
65794
66282
|
var enumTypeRel = $m_Lio_kaitai_struct_Utils$().relClass__sci_List__sci_List__sci_List(enumTypeAbs, this.provider$2.nowClass$1.name$1);
|
|
65795
66283
|
return $m_Lio_kaitai_struct_languages_CSharpCompiler$().types2class__sc_Iterable__T(enumTypeRel)
|
|
65796
66284
|
});
|
|
66285
|
+
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
66286
|
+
return ("" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
66287
|
+
});
|
|
65797
66288
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
65798
66289
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
65799
66290
|
});
|
|
@@ -66052,6 +66543,9 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strSubstring__Li
|
|
|
66052
66543
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
66053
66544
|
return (("Array.from(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ").reverse().join('')")
|
|
66054
66545
|
});
|
|
66546
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
66547
|
+
return ("this." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
66548
|
+
});
|
|
66055
66549
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
66056
66550
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
66057
66551
|
});
|
|
@@ -66080,12 +66574,12 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.intToStr__Lio_ka
|
|
|
66080
66574
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doIfExp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(condition, ifTrue, ifFalse) {
|
|
66081
66575
|
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(condition)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifTrue)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(ifFalse)) + ")")
|
|
66082
66576
|
});
|
|
66083
|
-
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
66084
|
-
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
|
|
66085
|
-
});
|
|
66086
66577
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.boolToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
66087
66578
|
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + " | 0)")
|
|
66088
66579
|
});
|
|
66580
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arraySubscript__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(container, idx) {
|
|
66581
|
+
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
|
|
66582
|
+
});
|
|
66089
66583
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(value) {
|
|
66090
66584
|
return this.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T(value)
|
|
66091
66585
|
});
|
|
@@ -66121,12 +66615,12 @@ $c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.arrayMax__Lio_ka
|
|
|
66121
66615
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.intToStr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(i, base) {
|
|
66122
66616
|
return (((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(i)) + ").toString(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(base)) + ")")
|
|
66123
66617
|
});
|
|
66124
|
-
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
66125
|
-
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ".isEof()")
|
|
66126
|
-
});
|
|
66127
66618
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.doName__T__T = (function(s) {
|
|
66128
66619
|
return (((s === "_root") || ((s === "_parent") || (s === "_io"))) ? s : $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s))
|
|
66129
66620
|
});
|
|
66621
|
+
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.kaitaiStreamEof__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
66622
|
+
return (this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value) + ".isEof()")
|
|
66623
|
+
});
|
|
66130
66624
|
$c_Lio_kaitai_struct_translators_JavaScriptTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
66131
66625
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
66132
66626
|
});
|
|
@@ -66370,6 +66864,10 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.enumClass__sci_List__T
|
|
|
66370
66864
|
};
|
|
66371
66865
|
return $as_sc_TraversableOnce(jsx$1).mkString__T__T(".")
|
|
66372
66866
|
});
|
|
66867
|
+
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
66868
|
+
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
66869
|
+
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
66870
|
+
});
|
|
66373
66871
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
66374
66872
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
66375
66873
|
});
|
|
@@ -66434,12 +66932,12 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.arraySubscript__Lio_ka
|
|
|
66434
66932
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strSubstring__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, from, to) {
|
|
66435
66933
|
return (((((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s) + ".substring(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(from)) + ", ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(to)) + ")")
|
|
66436
66934
|
});
|
|
66437
|
-
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
66438
|
-
return (("KaitaiStream.byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
|
|
66439
|
-
});
|
|
66440
66935
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
66441
66936
|
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b) + "[(") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ").length - 1]")
|
|
66442
66937
|
});
|
|
66938
|
+
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesMax__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(b) {
|
|
66939
|
+
return (("KaitaiStream.byteArrayMax(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(b)) + ")")
|
|
66940
|
+
});
|
|
66443
66941
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doByteArrayNonLiteral__sc_Seq__T = (function(elts) {
|
|
66444
66942
|
var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
|
|
66445
66943
|
return (function(v$2) {
|
|
@@ -66481,7 +66979,7 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.bytesSubscript__Lio_ka
|
|
|
66481
66979
|
return (((this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(container) + "[") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(idx)) + "]")
|
|
66482
66980
|
});
|
|
66483
66981
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doName__T__T = (function(s) {
|
|
66484
|
-
return (($m_Lio_kaitai_struct_format_Identifier$().
|
|
66982
|
+
return (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1 === s) ? "_it" : (($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 === s) ? "_buf" : (($m_Lio_kaitai_struct_format_Identifier$().SWITCH$undON$1 === s) ? "on" : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? "i" : ($m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(s) + "()")))))
|
|
66485
66983
|
});
|
|
66486
66984
|
$c_Lio_kaitai_struct_translators_JavaTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s, base) {
|
|
66487
66985
|
return this.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T(s, base)
|
|
@@ -66944,6 +67442,10 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strSubstring__Lio_kait
|
|
|
66944
67442
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
66945
67443
|
return (("scalar(reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + "))")
|
|
66946
67444
|
});
|
|
67445
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
67446
|
+
var this$1 = $m_Lio_kaitai_struct_languages_PerlCompiler$();
|
|
67447
|
+
return (("$self->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
67448
|
+
});
|
|
66947
67449
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
66948
67450
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
66949
67451
|
});
|
|
@@ -67061,12 +67563,12 @@ $c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayNonLiteral_
|
|
|
67061
67563
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.floatToInt__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(v) {
|
|
67062
67564
|
return (("int(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(v)) + ")")
|
|
67063
67565
|
});
|
|
67064
|
-
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
67065
|
-
return (("length(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
|
|
67066
|
-
});
|
|
67067
67566
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doLocalName__T__T = (function(s) {
|
|
67068
67567
|
return (((s === "_") || (s === "_on")) ? ("$" + s) : (($m_Lio_kaitai_struct_format_Identifier$().INDEX$1 === s) ? this.doName__T__T(s) : ("$self->" + this.doName__T__T(s))))
|
|
67069
67568
|
});
|
|
67569
|
+
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
67570
|
+
return (("length(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")")
|
|
67571
|
+
});
|
|
67070
67572
|
$c_Lio_kaitai_struct_translators_PerlTranslator.prototype.doByteArrayLiteral__sc_Seq__O = (function(arr) {
|
|
67071
67573
|
return this.doByteArrayLiteral__sc_Seq__T(arr)
|
|
67072
67574
|
});
|
|
@@ -67308,6 +67810,9 @@ $c_Lio_kaitai_struct_translators_PythonTranslator.prototype.bytesLast__Lio_kaita
|
|
|
67308
67810
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(value) {
|
|
67309
67811
|
return (("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(value)) + ")[::-1]")
|
|
67310
67812
|
});
|
|
67813
|
+
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
67814
|
+
return ("self." + $m_Lio_kaitai_struct_languages_PythonCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
67815
|
+
});
|
|
67311
67816
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
67312
67817
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
67313
67818
|
});
|
|
@@ -67605,6 +68110,10 @@ $c_Lio_kaitai_struct_translators_RubyTranslator.prototype.strReverse__Lio_kaitai
|
|
|
67605
68110
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
67606
68111
|
return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
67607
68112
|
});
|
|
68113
|
+
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
68114
|
+
var this$1 = $m_Lio_kaitai_struct_languages_RubyCompiler$();
|
|
68115
|
+
return this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
68116
|
+
});
|
|
67608
68117
|
$c_Lio_kaitai_struct_translators_RubyTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
67609
68118
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
67610
68119
|
});
|
|
@@ -69976,6 +70485,9 @@ $c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.init___Lio_kaitai
|
|
|
69976
70485
|
$c_Lio_kaitai_struct_translators_PythonTranslator.prototype.init___Lio_kaitai_struct_translators_TypeProvider__Lio_kaitai_struct_ImportList.call(this, provider, importList);
|
|
69977
70486
|
return this
|
|
69978
70487
|
});
|
|
70488
|
+
$c_Lio_kaitai_struct_translators_ConstructTranslator.prototype.doEnumByLabel__sci_List__T__T = (function(enumTypeAbs, label) {
|
|
70489
|
+
return (("'" + label) + "'")
|
|
70490
|
+
});
|
|
69979
70491
|
var $d_Lio_kaitai_struct_translators_ConstructTranslator = new $TypeData().initClass({
|
|
69980
70492
|
Lio_kaitai_struct_translators_ConstructTranslator: 0
|
|
69981
70493
|
}, false, "io.kaitai.struct.translators.ConstructTranslator", {
|
|
@@ -70107,6 +70619,10 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_
|
|
|
70107
70619
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
70108
70620
|
return this.bytesLast__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
70109
70621
|
});
|
|
70622
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
70623
|
+
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
70624
|
+
return (this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "()")
|
|
70625
|
+
});
|
|
70110
70626
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
|
|
70111
70627
|
return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
|
|
70112
70628
|
});
|
|
@@ -70334,6 +70850,9 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.doStrCompareOp__Lio_kai
|
|
|
70334
70850
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
|
|
70335
70851
|
return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
|
|
70336
70852
|
});
|
|
70853
|
+
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
70854
|
+
return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
70855
|
+
});
|
|
70337
70856
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
|
|
70338
70857
|
return (((("std::string(\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\", ") + arr.length__I()) + ")")
|
|
70339
70858
|
});
|
|
@@ -70356,9 +70875,6 @@ $c_Lio_kaitai_struct_translators_CppTranslator.prototype.numericBinOp__Lio_kaita
|
|
|
70356
70875
|
return $f_Lio_kaitai_struct_translators_CommonOps__numericBinOp__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$operator__Lio_kaitai_struct_exprlang_Ast$expr__T(this, left, op, right)
|
|
70357
70876
|
}
|
|
70358
70877
|
});
|
|
70359
|
-
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
70360
|
-
return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
70361
|
-
});
|
|
70362
70878
|
$c_Lio_kaitai_struct_translators_CppTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
|
|
70363
70879
|
return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
|
|
70364
70880
|
});
|
|
@@ -70486,6 +71002,9 @@ $c_Lio_kaitai_struct_translators_LuaTranslator.prototype.bytesLast__Lio_kaitai_s
|
|
|
70486
71002
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s) {
|
|
70487
71003
|
return (("string.reverse(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(s)) + ")")
|
|
70488
71004
|
});
|
|
71005
|
+
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
71006
|
+
return ("self." + $m_Lio_kaitai_struct_languages_LuaCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(id))
|
|
71007
|
+
});
|
|
70489
71008
|
$c_Lio_kaitai_struct_translators_LuaTranslator.prototype.strLength__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
|
|
70490
71009
|
return this.strLength__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
|
|
70491
71010
|
});
|
|
@@ -70945,6 +71464,10 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.init___Lio_kaitai_struc
|
|
|
70945
71464
|
this.namespaceRef$3 = ((thiz === "") ? "" : ("\\" + config.phpNamespace$1));
|
|
70946
71465
|
return this
|
|
70947
71466
|
});
|
|
71467
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doInternalName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
71468
|
+
var this$1 = $m_Lio_kaitai_struct_languages_PHPCompiler$();
|
|
71469
|
+
return (("$this->" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "()")
|
|
71470
|
+
});
|
|
70948
71471
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayNonLiteral__sc_Seq__O = (function(elts) {
|
|
70949
71472
|
return this.doByteArrayNonLiteral__sc_Seq__T(elts)
|
|
70950
71473
|
});
|
|
@@ -71119,6 +71642,9 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arraySize__Lio_kaitai_s
|
|
|
71119
71642
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(s) {
|
|
71120
71643
|
return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
|
|
71121
71644
|
});
|
|
71645
|
+
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
71646
|
+
return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
71647
|
+
});
|
|
71122
71648
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
|
|
71123
71649
|
return (("\"" + $m_Lio_kaitai_struct_Utils$().hexEscapeByteArray__sc_Seq__T(arr)) + "\"")
|
|
71124
71650
|
});
|
|
@@ -71155,9 +71681,6 @@ $c_Lio_kaitai_struct_translators_PHPTranslator.prototype.numericBinOp__Lio_kaita
|
|
|
71155
71681
|
}
|
|
71156
71682
|
}
|
|
71157
71683
|
});
|
|
71158
|
-
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(b) {
|
|
71159
|
-
return this.bytesFirst__Lio_kaitai_struct_exprlang_Ast$expr__T(b)
|
|
71160
|
-
});
|
|
71161
71684
|
$c_Lio_kaitai_struct_translators_PHPTranslator.prototype.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__O = (function(a) {
|
|
71162
71685
|
return this.arrayLast__Lio_kaitai_struct_exprlang_Ast$expr__T(a)
|
|
71163
71686
|
});
|
|
@@ -72354,6 +72877,14 @@ function $h_Lio_kaitai_struct_languages_CppCompiler() {
|
|
|
72354
72877
|
/*<skip>*/
|
|
72355
72878
|
}
|
|
72356
72879
|
$h_Lio_kaitai_struct_languages_CppCompiler.prototype = $c_Lio_kaitai_struct_languages_CppCompiler.prototype;
|
|
72880
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
72881
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
72882
|
+
this.outSrc$2.puts__T__V("i++;");
|
|
72883
|
+
this.outSrc$2.dec__V();
|
|
72884
|
+
this.outSrc$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
|
|
72885
|
+
this.outSrc$2.dec__V();
|
|
72886
|
+
this.outSrc$2.puts__T__V("}")
|
|
72887
|
+
});
|
|
72357
72888
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
72358
72889
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
|
|
72359
72890
|
this.outHdr$2.puts__T__V((("bool " + this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
@@ -72372,23 +72903,11 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.stdMoveWrap__T__T = (functi
|
|
|
72372
72903
|
return expr
|
|
72373
72904
|
}
|
|
72374
72905
|
});
|
|
72375
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.
|
|
72376
|
-
this.importListHdr$2.addSystem__T__V("vector");
|
|
72377
|
-
if ((needRaw.level__I() >= 1)) {
|
|
72378
|
-
this.outSrc$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)) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
|
|
72379
|
-
if (needRaw.hasIO__Z()) {
|
|
72380
|
-
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"))
|
|
72381
|
-
}
|
|
72382
|
-
};
|
|
72383
|
-
if ((needRaw.level__I() >= 2)) {
|
|
72384
|
-
this.outSrc$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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"))
|
|
72385
|
-
};
|
|
72386
|
-
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
|
|
72906
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
72387
72907
|
this.outSrc$2.puts__T__V("{");
|
|
72388
72908
|
this.outSrc$2.inc__V();
|
|
72389
72909
|
this.outSrc$2.puts__T__V("int i = 0;");
|
|
72390
|
-
this.outSrc$2.puts__T__V((((
|
|
72391
|
-
this.outSrc$2.puts__T__V("do {");
|
|
72910
|
+
this.outSrc$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
|
|
72392
72911
|
this.outSrc$2.inc__V()
|
|
72393
72912
|
});
|
|
72394
72913
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.needsDestruction__Lio_kaitai_struct_datatype_DataType__Z = (function(t) {
|
|
@@ -72422,7 +72941,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.newVector__Lio_kaitai_struc
|
|
|
72422
72941
|
}
|
|
72423
72942
|
});
|
|
72424
72943
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
72425
|
-
return ("p_" +
|
|
72944
|
+
return ("p_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
72426
72945
|
});
|
|
72427
72946
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.PrivateAccess$lzycompute$1__p2__V = (function() {
|
|
72428
72947
|
if ((this.PrivateAccess$module$2 === null)) {
|
|
@@ -72436,6 +72955,19 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchIfElseStart__V = (fun
|
|
|
72436
72955
|
this.outSrc$2.puts__T__V("else {");
|
|
72437
72956
|
this.outSrc$2.inc__V()
|
|
72438
72957
|
});
|
|
72958
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
72959
|
+
this.importListHdr$2.addSystem__T__V("vector");
|
|
72960
|
+
if ((needRaw.level__I() >= 1)) {
|
|
72961
|
+
this.outSrc$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)) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
|
|
72962
|
+
if (needRaw.hasIO__Z()) {
|
|
72963
|
+
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"))
|
|
72964
|
+
}
|
|
72965
|
+
};
|
|
72966
|
+
if ((needRaw.level__I() >= 2)) {
|
|
72967
|
+
this.outSrc$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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"))
|
|
72968
|
+
};
|
|
72969
|
+
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"))
|
|
72970
|
+
});
|
|
72439
72971
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.importDataType__Lio_kaitai_struct_datatype_DataType__V = (function(dt) {
|
|
72440
72972
|
if ((dt instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
72441
72973
|
var x2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(dt);
|
|
@@ -72461,10 +72993,17 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchCasesUsingIf__Lio_kai
|
|
|
72461
72993
|
});
|
|
72462
72994
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
72463
72995
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$());
|
|
72464
|
-
|
|
72465
|
-
var
|
|
72466
|
-
this$1
|
|
72467
|
-
|
|
72996
|
+
var jsx$2 = this.outHdr$2;
|
|
72997
|
+
var jsx$1 = this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType.asNonOwning__Lio_kaitai_struct_datatype_DataType(), false);
|
|
72998
|
+
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
72999
|
+
jsx$2.puts__T__V((((jsx$1 + " ") + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "();"));
|
|
73000
|
+
var this$2 = this.outSrc$2;
|
|
73001
|
+
this$2.sb$2.append__T__scm_StringBuilder("\n");
|
|
73002
|
+
var jsx$5 = this.outSrc$2;
|
|
73003
|
+
var jsx$4 = this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType.asNonOwning__Lio_kaitai_struct_datatype_DataType(), true);
|
|
73004
|
+
var jsx$3 = $m_Lio_kaitai_struct_languages_CppCompiler$().types2class__sci_List__T(className);
|
|
73005
|
+
var this$3 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
73006
|
+
jsx$5.puts__T__V((((((jsx$4 + " ") + jsx$3) + "::") + this$3.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
|
|
72468
73007
|
this.outSrc$2.inc__V()
|
|
72469
73008
|
});
|
|
72470
73009
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructMember__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, innerType, isArray, needRaw) {
|
|
@@ -72513,26 +73052,8 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructVector__T__T__V = (
|
|
|
72513
73052
|
this.outSrc$2.dec__V();
|
|
72514
73053
|
this.outSrc$2.puts__T__V("}")
|
|
72515
73054
|
});
|
|
72516
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
72517
|
-
this.importListHdr$2.addSystem__T__V("vector");
|
|
72518
|
-
if ((needRaw.level__I() >= 1)) {
|
|
72519
|
-
this.outSrc$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)) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
|
|
72520
|
-
if (needRaw.hasIO__Z()) {
|
|
72521
|
-
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"))
|
|
72522
|
-
}
|
|
72523
|
-
};
|
|
72524
|
-
if ((needRaw.level__I() >= 2)) {
|
|
72525
|
-
this.outSrc$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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"))
|
|
72526
|
-
};
|
|
72527
|
-
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
|
|
72528
|
-
this.outSrc$2.puts__T__V("{");
|
|
72529
|
-
this.outSrc$2.inc__V();
|
|
72530
|
-
this.outSrc$2.puts__T__V("int i = 0;");
|
|
72531
|
-
this.outSrc$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
|
|
72532
|
-
this.outSrc$2.inc__V()
|
|
72533
|
-
});
|
|
72534
73055
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
72535
|
-
return ("m_" +
|
|
73056
|
+
return ("m_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
72536
73057
|
});
|
|
72537
73058
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
|
|
72538
73059
|
this.outSrc$2.puts__T__V("{");
|
|
@@ -73006,38 +73527,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrInit__Lio_kaitai_struct
|
|
|
73006
73527
|
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attr.id__Lio_kaitai_struct_format_Identifier()) + " = ") + this.nullPtr__T()) + ";"))
|
|
73007
73528
|
}
|
|
73008
73529
|
});
|
|
73009
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
73010
|
-
if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
73011
|
-
var x2 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
73012
|
-
var inner = x2.innerId$2;
|
|
73013
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner))
|
|
73014
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_IoStorageIdentifier)) {
|
|
73015
|
-
var x3 = $as_Lio_kaitai_struct_format_IoStorageIdentifier(id);
|
|
73016
|
-
var inner$2 = x3.innerId$2;
|
|
73017
|
-
return ("_io_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner$2))
|
|
73018
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
73019
|
-
var x5 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
73020
|
-
$m_Lio_kaitai_struct_Utils$();
|
|
73021
|
-
var s = x5.name$2;
|
|
73022
|
-
return s
|
|
73023
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
73024
|
-
var x6 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
73025
|
-
$m_Lio_kaitai_struct_Utils$();
|
|
73026
|
-
var s$1 = x6.name$2;
|
|
73027
|
-
return s$1
|
|
73028
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
73029
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
73030
|
-
var idx = x4.idx$2;
|
|
73031
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
73032
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
73033
|
-
var x7 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
73034
|
-
$m_Lio_kaitai_struct_Utils$();
|
|
73035
|
-
var s$2 = x7.name$2;
|
|
73036
|
-
return s$2
|
|
73037
|
-
} else {
|
|
73038
|
-
throw new $c_s_MatchError().init___O(id)
|
|
73039
|
-
}
|
|
73040
|
-
});
|
|
73041
73530
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classDestructorHeader__sci_List__Lio_kaitai_struct_datatype_DataType__sci_List__V = (function(name, parentType, topClassName) {
|
|
73042
73531
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$());
|
|
73043
73532
|
this.outHdr$2.puts__T__V("void _clean_up();");
|
|
@@ -73089,8 +73578,14 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.destructWithSafeguardHeader
|
|
|
73089
73578
|
this.outSrc$2.puts__T__V((("if (" + ptr) + ") {"));
|
|
73090
73579
|
this.outSrc$2.inc__V()
|
|
73091
73580
|
});
|
|
73581
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
73582
|
+
var lenVar = ("l_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
73583
|
+
this.outSrc$2.puts__T__V((((("const int " + lenVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
|
|
73584
|
+
this.outSrc$2.puts__T__V((("for (int i = 0; i < " + lenVar) + "; i++) {"));
|
|
73585
|
+
this.outSrc$2.inc__V()
|
|
73586
|
+
});
|
|
73092
73587
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
73093
|
-
return ("_t_" +
|
|
73588
|
+
return ("_t_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
73094
73589
|
});
|
|
73095
73590
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$ = (function() {
|
|
73096
73591
|
if ((this.PrivateAccess$module$2 === null)) {
|
|
@@ -73183,7 +73678,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatEos__
|
|
|
73183
73678
|
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->push_back(") + this.stdMoveWrap__T__T(expr)) + ");"))
|
|
73184
73679
|
});
|
|
73185
73680
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
73186
|
-
this.
|
|
73681
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
73187
73682
|
});
|
|
73188
73683
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
73189
73684
|
var jsx$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
@@ -73297,6 +73792,14 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.classConstructorFooter__V =
|
|
|
73297
73792
|
this.outSrc$2.dec__V();
|
|
73298
73793
|
this.outSrc$2.puts__T__V("}")
|
|
73299
73794
|
});
|
|
73795
|
+
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
73796
|
+
this.outSrc$2.puts__T__V("{");
|
|
73797
|
+
this.outSrc$2.inc__V();
|
|
73798
|
+
this.outSrc$2.puts__T__V("int i = 0;");
|
|
73799
|
+
this.outSrc$2.puts__T__V((((this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(dataType.asNonOwning__Lio_kaitai_struct_datatype_DataType(), false) + " ") + this.translator$2.doName__T__T("_")) + ";"));
|
|
73800
|
+
this.outSrc$2.puts__T__V("do {");
|
|
73801
|
+
this.outSrc$2.inc__V()
|
|
73802
|
+
});
|
|
73300
73803
|
$c_Lio_kaitai_struct_languages_CppCompiler.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) {
|
|
73301
73804
|
$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)
|
|
73302
73805
|
});
|
|
@@ -73351,30 +73854,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.readFooter__V = (function()
|
|
|
73351
73854
|
this.outSrc$2.dec__V();
|
|
73352
73855
|
this.outSrc$2.puts__T__V("}")
|
|
73353
73856
|
});
|
|
73354
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
73355
|
-
this.importListHdr$2.addSystem__T__V("vector");
|
|
73356
|
-
var lenVar = ("l_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
73357
|
-
this.outSrc$2.puts__T__V((((("int " + lenVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
|
|
73358
|
-
if ((needRaw.level__I() >= 1)) {
|
|
73359
|
-
var rawId = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id));
|
|
73360
|
-
this.outSrc$2.puts__T__V((((rawId + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
|
|
73361
|
-
this.outSrc$2.puts__T__V((((rawId + "->reserve(") + lenVar) + ");"));
|
|
73362
|
-
if (needRaw.hasIO__Z()) {
|
|
73363
|
-
var ioId = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)));
|
|
73364
|
-
this.outSrc$2.puts__T__V((((ioId + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$OwnedKaitaiStreamType$())) + ";"));
|
|
73365
|
-
this.outSrc$2.puts__T__V((((ioId + "->reserve(") + lenVar) + ");"))
|
|
73366
|
-
}
|
|
73367
|
-
};
|
|
73368
|
-
if ((needRaw.level__I() >= 2)) {
|
|
73369
|
-
var rawId$2 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id)));
|
|
73370
|
-
this.outSrc$2.puts__T__V((((rawId$2 + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T($m_Lio_kaitai_struct_datatype_DataType$CalcBytesType$())) + ";"));
|
|
73371
|
-
this.outSrc$2.puts__T__V((((rawId$2 + "->reserve(") + lenVar) + ");"))
|
|
73372
|
-
};
|
|
73373
|
-
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + this.newVector__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ";"));
|
|
73374
|
-
this.outSrc$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "->reserve(") + lenVar) + ");"));
|
|
73375
|
-
this.outSrc$2.puts__T__V((("for (int i = 0; i < " + lenVar) + "; i++) {"));
|
|
73376
|
-
this.outSrc$2.inc__V()
|
|
73377
|
-
});
|
|
73378
73857
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.ksErrorName__Lio_kaitai_struct_datatype_KSError__T = (function(err) {
|
|
73379
73858
|
var x = $m_Lio_kaitai_struct_datatype_EndOfStreamError$();
|
|
73380
73859
|
if ((x === err)) {
|
|
@@ -73723,7 +74202,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
73723
74202
|
var jsx$1 = b.result__O()
|
|
73724
74203
|
};
|
|
73725
74204
|
var procClass = $as_sc_TraversableOnce(jsx$1).mkString__T__T("::");
|
|
73726
|
-
var procName$2 = ("_process_" +
|
|
74205
|
+
var procName$2 = ("_process_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
73727
74206
|
this.importListSrc$2.addLocal__T__V(this.outFileNameHeader__T__T($as_T($f_sc_LinearSeqOptimized__last__O(name))));
|
|
73728
74207
|
var jsx$2 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2$1) {
|
|
73729
74208
|
return (function(e$2) {
|
|
@@ -73746,7 +74225,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
73746
74225
|
$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)
|
|
73747
74226
|
});
|
|
73748
74227
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
|
|
73749
|
-
return ("f_" +
|
|
74228
|
+
return ("f_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
|
|
73750
74229
|
});
|
|
73751
74230
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.translator__Lio_kaitai_struct_translators_BaseTranslator = (function() {
|
|
73752
74231
|
return this.translator$2
|
|
@@ -73757,14 +74236,6 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.translator__Lio_kaitai_stru
|
|
|
73757
74236
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.classDestructorFooter__V = (function() {
|
|
73758
74237
|
this.classConstructorFooter__V()
|
|
73759
74238
|
});
|
|
73760
|
-
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
73761
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
73762
|
-
this.outSrc$2.puts__T__V("i++;");
|
|
73763
|
-
this.outSrc$2.dec__V();
|
|
73764
|
-
this.outSrc$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
|
|
73765
|
-
this.outSrc$2.dec__V();
|
|
73766
|
-
this.outSrc$2.puts__T__V("}")
|
|
73767
|
-
});
|
|
73768
74239
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
73769
74240
|
$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)
|
|
73770
74241
|
});
|
|
@@ -73795,7 +74266,7 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.allocateIO__Lio_kaitai_stru
|
|
|
73795
74266
|
var ioName = (this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(ioId) + ".get()")
|
|
73796
74267
|
}
|
|
73797
74268
|
} else {
|
|
73798
|
-
var localIO = ("io_" +
|
|
74269
|
+
var localIO = ("io_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
73799
74270
|
this.outSrc$2.puts__T__V((((("kaitai::kstream* " + localIO) + " = ") + newStreamRaw) + ";"));
|
|
73800
74271
|
var x$9 = this.config$1.cppConfig$1.pointers$1;
|
|
73801
74272
|
var x$10 = $m_Lio_kaitai_struct_CppRuntimeConfig$UniqueAndRawPointers$();
|
|
@@ -73812,7 +74283,10 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.declareNullFlag__Lio_kaitai
|
|
|
73812
74283
|
if (isNullable) {
|
|
73813
74284
|
this.outHdr$2.puts__T__V((("bool " + this.nullFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
73814
74285
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$());
|
|
73815
|
-
|
|
74286
|
+
var jsx$2 = this.outHdr$2;
|
|
74287
|
+
var jsx$1 = $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName);
|
|
74288
|
+
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
74289
|
+
jsx$2.puts__T__V((((((("bool _is_null_" + jsx$1) + "() { ") + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "(); return ") + this.nullFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; };"));
|
|
73816
74290
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PrivateAccess__Lio_kaitai_struct_languages_CppCompiler$PrivateAccess$())
|
|
73817
74291
|
}
|
|
73818
74292
|
});
|
|
@@ -73894,10 +74368,13 @@ $c_Lio_kaitai_struct_languages_CppCompiler.prototype.fileHeader__T__V = (functio
|
|
|
73894
74368
|
});
|
|
73895
74369
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
73896
74370
|
this.ensureMode__Lio_kaitai_struct_languages_CppCompiler$AccessMode__V(this.PublicAccess__Lio_kaitai_struct_languages_CppCompiler$PublicAccess$());
|
|
73897
|
-
|
|
74371
|
+
var jsx$2 = this.outHdr$2;
|
|
74372
|
+
var jsx$1 = this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType.asNonOwning__Lio_kaitai_struct_datatype_DataType(), false);
|
|
74373
|
+
var this$1 = $m_Lio_kaitai_struct_languages_CppCompiler$();
|
|
74374
|
+
jsx$2.puts__T__V((((((jsx$1 + " ") + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() const { return ") + this.nonOwningPointer__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T(attrName, attrType)) + "; }"))
|
|
73898
74375
|
});
|
|
73899
74376
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.nullFlagForName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
|
|
73900
|
-
return ("n_" +
|
|
74377
|
+
return ("n_" + $m_Lio_kaitai_struct_languages_CppCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
|
|
73901
74378
|
});
|
|
73902
74379
|
$c_Lio_kaitai_struct_languages_CppCompiler.prototype.instanceClear__Lio_kaitai_struct_format_InstanceIdentifier__V = (function(instName) {
|
|
73903
74380
|
this.outSrc$2.puts__T__V((this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(instName) + " = false;"))
|
|
@@ -74404,22 +74881,34 @@ function $h_Lio_kaitai_struct_languages_GoCompiler() {
|
|
|
74404
74881
|
/*<skip>*/
|
|
74405
74882
|
}
|
|
74406
74883
|
$h_Lio_kaitai_struct_languages_GoCompiler.prototype = $c_Lio_kaitai_struct_languages_GoCompiler.prototype;
|
|
74884
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
74885
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
74886
|
+
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " {"));
|
|
74887
|
+
this.out$2.inc__V();
|
|
74888
|
+
this.out$2.puts__T__V("break");
|
|
74889
|
+
this.out$2.dec__V();
|
|
74890
|
+
this.out$2.puts__T__V("}");
|
|
74891
|
+
this.out$2.dec__V();
|
|
74892
|
+
this.out$2.puts__T__V("}")
|
|
74893
|
+
});
|
|
74407
74894
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchEnd__V = (function() {
|
|
74408
74895
|
this.out$2.puts__T__V("}")
|
|
74409
74896
|
});
|
|
74410
74897
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
74411
74898
|
this.out$2.puts__T__V((this.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T(attrName) + " bool"));
|
|
74412
|
-
this.out$2.puts__T__V(((
|
|
74899
|
+
this.out$2.puts__T__V((($m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName) + " ") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(attrType)))
|
|
74413
74900
|
});
|
|
74414
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.
|
|
74415
|
-
if ((needRaw.level__I() >= 1)) {
|
|
74416
|
-
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)) + " = make([][]byte, 0);"))
|
|
74417
|
-
};
|
|
74418
|
-
if ((needRaw.level__I() >= 2)) {
|
|
74419
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = make([][]byte, 0);"))
|
|
74420
|
-
};
|
|
74901
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
74421
74902
|
this.out$2.puts__T__V("for i := 1;; i++ {");
|
|
74422
|
-
this.out$2.inc__V()
|
|
74903
|
+
this.out$2.inc__V();
|
|
74904
|
+
var eofVar = this.translator$2.allocateLocalVar__I();
|
|
74905
|
+
this.out$2.puts__T__V((this.translator$2.localVarName__I__T(eofVar) + ", err := this._io.EOF()"));
|
|
74906
|
+
this.translator$2.outAddErrCheck__V();
|
|
74907
|
+
this.out$2.puts__T__V((("if " + this.translator$2.localVarName__I__T(eofVar)) + " {"));
|
|
74908
|
+
this.out$2.inc__V();
|
|
74909
|
+
this.out$2.puts__T__V("break");
|
|
74910
|
+
this.out$2.dec__V();
|
|
74911
|
+
this.out$2.puts__T__V("}")
|
|
74423
74912
|
});
|
|
74424
74913
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStartCompareFn__T__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(compareFn, switchOn, condition) {
|
|
74425
74914
|
this.out$2.puts__T__V((((((("case " + compareFn) + "(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, switchOn)) + ", ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, condition)) + "):"));
|
|
@@ -74428,6 +74917,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStartCompareFn__T_
|
|
|
74428
74917
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
74429
74918
|
this.outHeader$2 = x$1
|
|
74430
74919
|
});
|
|
74920
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
74921
|
+
/*<skip>*/
|
|
74922
|
+
});
|
|
74431
74923
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
74432
74924
|
this.out$2.puts__T__V((("switch " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$())) + " {"));
|
|
74433
74925
|
this.out$2.puts__T__V("case 0:");
|
|
@@ -74445,30 +74937,12 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrParseHybrid__F0__F0__V =
|
|
|
74445
74937
|
this.out$2.puts__T__V("}")
|
|
74446
74938
|
});
|
|
74447
74939
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
74448
|
-
this.out$2.puts__T__V((((((("func (this *" + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T(className)) + ") ") +
|
|
74940
|
+
this.out$2.puts__T__V((((((("func (this *" + $m_Lio_kaitai_struct_languages_GoCompiler$().types2class__sci_List__T(className)) + ") ") + $m_Lio_kaitai_struct_languages_GoCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + "() (v ") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ", err error) {"));
|
|
74449
74941
|
this.out$2.inc__V();
|
|
74450
74942
|
this.translator$2.returnRes$2 = new $c_s_Some().init___O(((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) ? "0" : ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType) ? "false" : ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType) ? "\"\"" : "nil"))))
|
|
74451
74943
|
});
|
|
74452
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
74453
|
-
if ((needRaw.level__I() >= 1)) {
|
|
74454
|
-
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)) + " = make([][]byte, 0);"))
|
|
74455
|
-
};
|
|
74456
|
-
if ((needRaw.level__I() >= 2)) {
|
|
74457
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = make([][]byte, 0);"))
|
|
74458
|
-
};
|
|
74459
|
-
this.out$2.puts__T__V("for i := 1;; i++ {");
|
|
74460
|
-
this.out$2.inc__V();
|
|
74461
|
-
var eofVar = this.translator$2.allocateLocalVar__I();
|
|
74462
|
-
this.out$2.puts__T__V((this.translator$2.localVarName__I__T(eofVar) + ", err := this._io.EOF()"));
|
|
74463
|
-
this.translator$2.outAddErrCheck__V();
|
|
74464
|
-
this.out$2.puts__T__V((("if " + this.translator$2.localVarName__I__T(eofVar)) + " {"));
|
|
74465
|
-
this.out$2.inc__V();
|
|
74466
|
-
this.out$2.puts__T__V("break");
|
|
74467
|
-
this.out$2.dec__V();
|
|
74468
|
-
this.out$2.puts__T__V("}")
|
|
74469
|
-
});
|
|
74470
74944
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
74471
|
-
return ("this." +
|
|
74945
|
+
return ("this." + $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
74472
74946
|
});
|
|
74473
74947
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.seek__T__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(io, pos) {
|
|
74474
74948
|
var this$1 = this.importList$2;
|
|
@@ -74540,6 +75014,13 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrValidateExpr__Lio_kaitai
|
|
|
74540
75014
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatEosFooter__V = (function() {
|
|
74541
75015
|
this.universalFooter__V()
|
|
74542
75016
|
});
|
|
75017
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.blockScopeHeader__V = (function() {
|
|
75018
|
+
this.out$2.puts__T__V("{");
|
|
75019
|
+
this.out$2.inc__V()
|
|
75020
|
+
});
|
|
75021
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.blockScopeFooter__V = (function() {
|
|
75022
|
+
this.universalFooter__V()
|
|
75023
|
+
});
|
|
74543
75024
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.pushPos__T__V = (function(io) {
|
|
74544
75025
|
this.out$2.puts__T__V((("_pos, err := " + io) + ".Pos()"));
|
|
74545
75026
|
this.translator$2.outAddErrCheck__V()
|
|
@@ -74593,9 +75074,10 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.classConstructorHeader__sci_
|
|
|
74593
75074
|
var arg1$3 = these$1.head__O();
|
|
74594
75075
|
var p$3 = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$3);
|
|
74595
75076
|
var jsx$3 = this.out$2;
|
|
74596
|
-
var jsx$2 = this.idToStr__Lio_kaitai_struct_format_Identifier__T(p$3.id$1);
|
|
74597
75077
|
var id$1 = p$3.id$1;
|
|
74598
|
-
jsx$
|
|
75078
|
+
var jsx$2 = $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1);
|
|
75079
|
+
var id$2 = p$3.id$1;
|
|
75080
|
+
jsx$3.puts__T__V((((jsx$2 + ": ") + $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(id$2.humanReadable__T())) + ","));
|
|
74599
75081
|
var this$4 = these$1;
|
|
74600
75082
|
these$1 = this$4.tail__sci_List()
|
|
74601
75083
|
};
|
|
@@ -74684,41 +75166,12 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrParse2$default$7__s_Opti
|
|
|
74684
75166
|
return $m_s_None$()
|
|
74685
75167
|
});
|
|
74686
75168
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
74687
|
-
$
|
|
74688
|
-
});
|
|
74689
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
74690
|
-
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
74691
|
-
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
74692
|
-
var name = x2.name$2;
|
|
74693
|
-
return name
|
|
74694
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
74695
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
74696
|
-
var name$2 = x3.name$2;
|
|
74697
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$2)
|
|
74698
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
74699
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
74700
|
-
var idx = x4.idx$2;
|
|
74701
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
74702
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
74703
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
74704
|
-
var name$3 = x5.name$2;
|
|
74705
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3)
|
|
74706
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
74707
|
-
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
74708
|
-
var innerId = x6.innerId$2;
|
|
74709
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
74710
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_IoStorageIdentifier)) {
|
|
74711
|
-
var x7 = $as_Lio_kaitai_struct_format_IoStorageIdentifier(id);
|
|
74712
|
-
var innerId$2 = x7.innerId$2;
|
|
74713
|
-
return ("_io_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId$2))
|
|
74714
|
-
} else {
|
|
74715
|
-
throw new $c_s_MatchError().init___O(id)
|
|
74716
|
-
}
|
|
75169
|
+
this.out$2.puts__T__V(((id + " := ") + expr))
|
|
74717
75170
|
});
|
|
74718
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.
|
|
74719
|
-
|
|
74720
|
-
|
|
74721
|
-
this.out$2.puts__T__V(
|
|
75171
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
75172
|
+
this.out$2.puts__T__V((("for i := 0; i < int(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "); i++ {"));
|
|
75173
|
+
this.out$2.inc__V();
|
|
75174
|
+
this.out$2.puts__T__V("_ = i")
|
|
74722
75175
|
});
|
|
74723
75176
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
74724
75177
|
this.out$2.puts__T__V((io + ".AlignToByte()"))
|
|
@@ -74746,7 +75199,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.type2class__T__T = (function
|
|
|
74746
75199
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
74747
75200
|
});
|
|
74748
75201
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
74749
|
-
this.out$2.puts__T__V(((
|
|
75202
|
+
this.out$2.puts__T__V((($m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName) + " ") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(attrType)));
|
|
74750
75203
|
this.translator$2.returnRes$2 = $m_s_None$()
|
|
74751
75204
|
});
|
|
74752
75205
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List = (function(id, rep) {
|
|
@@ -74786,7 +75239,11 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.readHeader__s_Option__Z__V =
|
|
|
74786
75239
|
var p5 = $as_Lio_kaitai_struct_datatype_Endianness(x2.value$2);
|
|
74787
75240
|
var x$3 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
74788
75241
|
if ((x$3 === p5)) {
|
|
74789
|
-
|
|
75242
|
+
var jsx$6 = this.out$2;
|
|
75243
|
+
var jsx$5 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$());
|
|
75244
|
+
var jsx$4 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_ParentIdentifier$());
|
|
75245
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
75246
|
+
jsx$6.puts__T__V((((((jsx$5 + " = ") + jsx$4) + ".") + "") + $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)));
|
|
74790
75247
|
break matchEnd10
|
|
74791
75248
|
}
|
|
74792
75249
|
}
|
|
@@ -74821,6 +75278,10 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchCaseStart__Lio_kaitai_
|
|
|
74821
75278
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.classConstructorFooter__V = (function() {
|
|
74822
75279
|
/*<skip>*/
|
|
74823
75280
|
});
|
|
75281
|
+
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
75282
|
+
this.out$2.puts__T__V("for i := 1;; i++ {");
|
|
75283
|
+
this.out$2.inc__V()
|
|
75284
|
+
});
|
|
74824
75285
|
$c_Lio_kaitai_struct_languages_GoCompiler.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, assignType) {
|
|
74825
75286
|
$f_Lio_kaitai_struct_languages_components_GoReads__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, assignType)
|
|
74826
75287
|
});
|
|
@@ -74871,17 +75332,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.readFooter__V = (function()
|
|
|
74871
75332
|
this.out$2.puts__T__V("return err");
|
|
74872
75333
|
this.universalFooter__V()
|
|
74873
75334
|
});
|
|
74874
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
74875
|
-
if ((needRaw.level__I() >= 1)) {
|
|
74876
|
-
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)) + " = make([][]byte, ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
|
|
74877
|
-
};
|
|
74878
|
-
if ((needRaw.level__I() >= 2)) {
|
|
74879
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = make([][]byte, ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
|
|
74880
|
-
};
|
|
74881
|
-
this.out$2.puts__T__V((((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = make(") + $m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + ", ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"));
|
|
74882
|
-
this.out$2.puts__T__V((("for i := range " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + " {"));
|
|
74883
|
-
this.out$2.inc__V()
|
|
74884
|
-
});
|
|
74885
75335
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
74886
75336
|
this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
|
|
74887
75337
|
});
|
|
@@ -74938,7 +75388,9 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.classFooter__sci_List__V = (
|
|
|
74938
75388
|
var jsx$1 = false
|
|
74939
75389
|
};
|
|
74940
75390
|
if (jsx$1) {
|
|
74941
|
-
this.out$2
|
|
75391
|
+
var jsx$2 = this.out$2;
|
|
75392
|
+
var id = $m_Lio_kaitai_struct_format_EndianIdentifier$();
|
|
75393
|
+
jsx$2.puts__T__V(($m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id) + " int"))
|
|
74942
75394
|
};
|
|
74943
75395
|
this.universalFooter__V()
|
|
74944
75396
|
});
|
|
@@ -74968,40 +75420,6 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.attrDebugEnd__Lio_kaitai_str
|
|
|
74968
75420
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.castToType__p2__Lio_kaitai_struct_translators_TranslatorResult__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_translators_TranslatorResult = (function(r, dataType) {
|
|
74969
75421
|
return (((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$IntMultiType) || (dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$FloatMultiType)) ? new $c_Lio_kaitai_struct_translators_ResultString().init___T(((($m_Lio_kaitai_struct_languages_GoCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType) + "(") + this.translator$2.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r)) + ")")) : r)
|
|
74970
75422
|
});
|
|
74971
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
74972
|
-
var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
74973
|
-
if (x.equals__O__Z(id)) {
|
|
74974
|
-
return "_IO"
|
|
74975
|
-
} else {
|
|
74976
|
-
var x$3 = $m_Lio_kaitai_struct_format_RootIdentifier$();
|
|
74977
|
-
if (x$3.equals__O__Z(id)) {
|
|
74978
|
-
return "_Root"
|
|
74979
|
-
} else {
|
|
74980
|
-
var x$5 = $m_Lio_kaitai_struct_format_ParentIdentifier$();
|
|
74981
|
-
if (x$5.equals__O__Z(id)) {
|
|
74982
|
-
return "_Parent"
|
|
74983
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
74984
|
-
var x2 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
74985
|
-
var name = x2.name$2;
|
|
74986
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
74987
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
74988
|
-
var x3 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
74989
|
-
var idx = x3.idx$2;
|
|
74990
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
74991
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
74992
|
-
var x4 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
74993
|
-
var name$2 = x4.name$2;
|
|
74994
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$2)
|
|
74995
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
74996
|
-
var x5 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
74997
|
-
var innerId = x5.innerId$2;
|
|
74998
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
74999
|
-
} else {
|
|
75000
|
-
throw new $c_s_MatchError().init___O(id)
|
|
75001
|
-
}
|
|
75002
|
-
}
|
|
75003
|
-
}
|
|
75004
|
-
});
|
|
75005
75423
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condIfFooter__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(expr) {
|
|
75006
75424
|
this.universalFooter__V()
|
|
75007
75425
|
});
|
|
@@ -75010,7 +75428,7 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.normalIO__T = (function() {
|
|
|
75010
75428
|
});
|
|
75011
75429
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_translators_TranslatorResult__Z__V = (function(id, r, isRaw) {
|
|
75012
75430
|
var expr = this.translator$2.resToStr__Lio_kaitai_struct_translators_TranslatorResult__T(r);
|
|
75013
|
-
var tempVar = this.translator$2.specialName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1);
|
|
75431
|
+
var tempVar = this.translator$2.specialName__T__T((isRaw ? $m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 : $m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1));
|
|
75014
75432
|
this.out$2.puts__T__V(((tempVar + " := ") + expr));
|
|
75015
75433
|
this.out$2.puts__T__V((((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = append(") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + ", ") + tempVar) + ")"))
|
|
75016
75434
|
});
|
|
@@ -75105,21 +75523,11 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.handleAssignmentRepeatEos__L
|
|
|
75105
75523
|
this.out$2.puts__T__V((((((name + " = append(") + name) + ", ") + expr) + ")"))
|
|
75106
75524
|
});
|
|
75107
75525
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.calculatedFlagForName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
75108
|
-
return ("_f_" +
|
|
75526
|
+
return ("_f_" + $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
75109
75527
|
});
|
|
75110
75528
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
75111
75529
|
return this.translator$2
|
|
75112
75530
|
});
|
|
75113
|
-
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
75114
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
75115
|
-
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " {"));
|
|
75116
|
-
this.out$2.inc__V();
|
|
75117
|
-
this.out$2.puts__T__V("break");
|
|
75118
|
-
this.out$2.dec__V();
|
|
75119
|
-
this.out$2.puts__T__V("}");
|
|
75120
|
-
this.out$2.dec__V();
|
|
75121
|
-
this.out$2.puts__T__V("}")
|
|
75122
|
-
});
|
|
75123
75531
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.universalFooter__V = (function() {
|
|
75124
75532
|
this.out$2.dec__V();
|
|
75125
75533
|
this.out$2.puts__T__V("}")
|
|
@@ -75199,7 +75607,8 @@ $c_Lio_kaitai_struct_languages_GoCompiler.prototype.instanceCalculate__Lio_kaita
|
|
|
75199
75607
|
});
|
|
75200
75608
|
$c_Lio_kaitai_struct_languages_GoCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
75201
75609
|
this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
75202
|
-
var
|
|
75610
|
+
var id = new $c_Lio_kaitai_struct_format_IoStorageIdentifier().init___Lio_kaitai_struct_format_Identifier(varName);
|
|
75611
|
+
var ioName = $m_Lio_kaitai_struct_languages_GoCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id);
|
|
75203
75612
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? this.translator$2.specialName__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));
|
|
75204
75613
|
var this$1 = this.importList$2;
|
|
75205
75614
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "bytes");
|
|
@@ -75274,6 +75683,12 @@ function $h_Lio_kaitai_struct_languages_JavaScriptCompiler() {
|
|
|
75274
75683
|
/*<skip>*/
|
|
75275
75684
|
}
|
|
75276
75685
|
$h_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype = $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype;
|
|
75686
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
75687
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
75688
|
+
this.out$2.puts__T__V("i++;");
|
|
75689
|
+
this.out$2.dec__V();
|
|
75690
|
+
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
|
|
75691
|
+
});
|
|
75277
75692
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchEnd__V = (function() {
|
|
75278
75693
|
this.out$2.puts__T__V("}")
|
|
75279
75694
|
});
|
|
@@ -75292,19 +75707,9 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classToString__Lio_k
|
|
|
75292
75707
|
this.out$2.dec__V();
|
|
75293
75708
|
this.out$2.puts__T__V("}")
|
|
75294
75709
|
});
|
|
75295
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.
|
|
75296
|
-
if ((needRaw.level__I() >= 1)) {
|
|
75297
|
-
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)) + " = []"))
|
|
75298
|
-
};
|
|
75299
|
-
if ((needRaw.level__I() >= 2)) {
|
|
75300
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
75301
|
-
};
|
|
75302
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
|
|
75303
|
-
if (this.config$1.readStoresPos$1) {
|
|
75304
|
-
this.out$2.puts__T__V((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
|
|
75305
|
-
};
|
|
75710
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
75306
75711
|
this.out$2.puts__T__V("var i = 0;");
|
|
75307
|
-
this.out$2.puts__T__V("
|
|
75712
|
+
this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
|
|
75308
75713
|
this.out$2.inc__V()
|
|
75309
75714
|
});
|
|
75310
75715
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
@@ -75314,6 +75719,18 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfElseStart__V
|
|
|
75314
75719
|
this.out$2.puts__T__V("else {");
|
|
75315
75720
|
this.out$2.inc__V()
|
|
75316
75721
|
});
|
|
75722
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
75723
|
+
if ((needRaw.level__I() >= 1)) {
|
|
75724
|
+
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)) + " = [];"))
|
|
75725
|
+
};
|
|
75726
|
+
if ((needRaw.level__I() >= 2)) {
|
|
75727
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
75728
|
+
};
|
|
75729
|
+
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
|
|
75730
|
+
if (this.config$1.readStoresPos$1) {
|
|
75731
|
+
this.out$2.puts__T__V((("this._debug." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
|
|
75732
|
+
}
|
|
75733
|
+
});
|
|
75317
75734
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
75318
75735
|
this.out$2.puts__T__V("if (this._is_le) {");
|
|
75319
75736
|
this.out$2.inc__V();
|
|
@@ -75329,30 +75746,17 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchCasesUsingIf__
|
|
|
75329
75746
|
$f_Lio_kaitai_struct_languages_components_SwitchIfOps__switchCasesUsingIf__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__sci_Map__F1__F1__V(this, id, on, onType, cases, normalCaseProc, elseCaseProc)
|
|
75330
75747
|
});
|
|
75331
75748
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
75332
|
-
var jsx$
|
|
75749
|
+
var jsx$2 = this.out$2;
|
|
75333
75750
|
var name = $as_T($f_sc_LinearSeqOptimized__last__O(className));
|
|
75334
|
-
jsx$1
|
|
75751
|
+
var jsx$1 = $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name);
|
|
75752
|
+
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
75753
|
+
jsx$2.puts__T__V((((("Object.defineProperty(" + jsx$1) + ".prototype, '") + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "', {"));
|
|
75335
75754
|
this.out$2.inc__V();
|
|
75336
75755
|
this.out$2.puts__T__V("get: function() {");
|
|
75337
75756
|
this.out$2.inc__V()
|
|
75338
75757
|
});
|
|
75339
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
75340
|
-
if ((needRaw.level__I() >= 1)) {
|
|
75341
|
-
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)) + " = [];"))
|
|
75342
|
-
};
|
|
75343
|
-
if ((needRaw.level__I() >= 2)) {
|
|
75344
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
75345
|
-
};
|
|
75346
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
|
|
75347
|
-
if (this.config$1.readStoresPos$1) {
|
|
75348
|
-
this.out$2.puts__T__V((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = [];"))
|
|
75349
|
-
};
|
|
75350
|
-
this.out$2.puts__T__V("var i = 0;");
|
|
75351
|
-
this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
|
|
75352
|
-
this.out$2.inc__V()
|
|
75353
|
-
});
|
|
75354
75758
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
75355
|
-
return ("this." +
|
|
75759
|
+
return ("this." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
75356
75760
|
});
|
|
75357
75761
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
|
|
75358
75762
|
this.out$2.puts__T__V("{");
|
|
@@ -75430,7 +75834,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classConstructorHead
|
|
|
75430
75834
|
return (function(p$2) {
|
|
75431
75835
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
75432
75836
|
var id = p.id$1;
|
|
75433
|
-
return $
|
|
75837
|
+
return $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
75434
75838
|
})
|
|
75435
75839
|
})(this);
|
|
75436
75840
|
var this$1 = $m_sci_List$();
|
|
@@ -75481,7 +75885,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classConstructorHead
|
|
|
75481
75885
|
var p$3 = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$3);
|
|
75482
75886
|
var jsx$4 = p$3.id$1;
|
|
75483
75887
|
var id$1 = p$3.id$1;
|
|
75484
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$4,
|
|
75888
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$4, $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1));
|
|
75485
75889
|
var this$4 = these$1;
|
|
75486
75890
|
these$1 = this$4.tail__sci_List()
|
|
75487
75891
|
};
|
|
@@ -75796,33 +76200,12 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrParse2$default$7
|
|
|
75796
76200
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
75797
76201
|
this.out$2.puts__T__V((((("var " + id) + " = ") + expr) + ";"))
|
|
75798
76202
|
});
|
|
75799
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.
|
|
75800
|
-
|
|
75801
|
-
|
|
75802
|
-
var name = x2.name$2;
|
|
75803
|
-
return name
|
|
75804
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
75805
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
75806
|
-
var name$2 = x3.name$2;
|
|
75807
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
75808
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
75809
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
75810
|
-
var idx = x4.idx$2;
|
|
75811
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
75812
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
75813
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
75814
|
-
var name$3 = x5.name$2;
|
|
75815
|
-
return ("_m_" + $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3))
|
|
75816
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
75817
|
-
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
75818
|
-
var innerId = x6.innerId$2;
|
|
75819
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
75820
|
-
} else {
|
|
75821
|
-
throw new $c_s_MatchError().init___O(id)
|
|
75822
|
-
}
|
|
76203
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
76204
|
+
this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
|
|
76205
|
+
this.out$2.inc__V()
|
|
75823
76206
|
});
|
|
75824
76207
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
75825
|
-
return ("_t_" +
|
|
76208
|
+
return ("_t_" + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
75826
76209
|
});
|
|
75827
76210
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
75828
76211
|
this.out$2.puts__T__V((io + ".alignToByte();"))
|
|
@@ -75866,7 +76249,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepe
|
|
|
75866
76249
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".push(") + expr) + ");"))
|
|
75867
76250
|
});
|
|
75868
76251
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
75869
|
-
this.
|
|
76252
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
75870
76253
|
});
|
|
75871
76254
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
|
|
75872
76255
|
if ((endian instanceof $c_s_Some)) {
|
|
@@ -75921,6 +76304,11 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.classConstructorFoot
|
|
|
75921
76304
|
this.out$2.dec__V();
|
|
75922
76305
|
this.out$2.puts__T__V("}")
|
|
75923
76306
|
});
|
|
76307
|
+
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
76308
|
+
this.out$2.puts__T__V("var i = 0;");
|
|
76309
|
+
this.out$2.puts__T__V("do {");
|
|
76310
|
+
this.out$2.inc__V()
|
|
76311
|
+
});
|
|
75924
76312
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.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) {
|
|
75925
76313
|
$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)
|
|
75926
76314
|
});
|
|
@@ -75963,20 +76351,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.readFooter__V = (fun
|
|
|
75963
76351
|
this.out$2.dec__V();
|
|
75964
76352
|
this.out$2.puts__T__V("}")
|
|
75965
76353
|
});
|
|
75966
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
75967
|
-
if ((needRaw.level__I() >= 1)) {
|
|
75968
|
-
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)) + " = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"))
|
|
75969
|
-
};
|
|
75970
|
-
if ((needRaw.level__I() >= 2)) {
|
|
75971
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"))
|
|
75972
|
-
};
|
|
75973
|
-
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"));
|
|
75974
|
-
if (this.config$1.readStoresPos$1) {
|
|
75975
|
-
this.out$2.puts__T__V((((("this._debug." + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + ".arr = new Array(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ");"))
|
|
75976
|
-
};
|
|
75977
|
-
this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
|
|
75978
|
-
this.out$2.inc__V()
|
|
75979
|
-
});
|
|
75980
76354
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
75981
76355
|
this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
|
|
75982
76356
|
});
|
|
@@ -76047,19 +76421,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugEnd__Lio_ka
|
|
|
76047
76421
|
var debugName = this.attrDebugName__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__Z__T(attrId, rep, true);
|
|
76048
76422
|
this.out$2.puts__T__V((((debugName + ".end = ") + io) + ".pos;"))
|
|
76049
76423
|
});
|
|
76050
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
76051
|
-
if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
76052
|
-
var x2 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
76053
|
-
var name = x2.name$2;
|
|
76054
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name)
|
|
76055
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
76056
|
-
var x3 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
76057
|
-
var name$2 = x3.name$2;
|
|
76058
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
76059
|
-
} else {
|
|
76060
|
-
throw new $c_s_MatchError().init___O(id)
|
|
76061
|
-
}
|
|
76062
|
-
});
|
|
76063
76424
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.bytesPadTermExpr__T__s_Option__s_Option__Z__T = (function(expr0, padRight, terminator, include) {
|
|
76064
76425
|
if ((padRight instanceof $c_s_Some)) {
|
|
76065
76426
|
var x2 = $as_s_Some(padRight);
|
|
@@ -76234,12 +76595,6 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.translator__Lio_kait
|
|
|
76234
76595
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
76235
76596
|
return this.translator$2
|
|
76236
76597
|
});
|
|
76237
|
-
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
76238
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
76239
|
-
this.out$2.puts__T__V("i++;");
|
|
76240
|
-
this.out$2.dec__V();
|
|
76241
|
-
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
|
|
76242
|
-
});
|
|
76243
76598
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugName__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__Z__T = (function(attrId, rep, end) {
|
|
76244
76599
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
76245
76600
|
if ((x === rep)) {
|
|
@@ -76253,7 +76608,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.attrDebugName__Lio_k
|
|
|
76253
76608
|
};
|
|
76254
76609
|
var arrIndexExpr = ((((".arr[" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrId)) + ".length") + (end ? " - 1" : "")) + "]")
|
|
76255
76610
|
};
|
|
76256
|
-
return (("this._debug." +
|
|
76611
|
+
return (("this._debug." + $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId)) + arrIndexExpr)
|
|
76257
76612
|
});
|
|
76258
76613
|
$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) {
|
|
76259
76614
|
$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)
|
|
@@ -76262,7 +76617,7 @@ $c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.outHeader__Lio_kaita
|
|
|
76262
76617
|
return this.outHeader$2
|
|
76263
76618
|
});
|
|
76264
76619
|
$c_Lio_kaitai_struct_languages_JavaScriptCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
76265
|
-
var langName =
|
|
76620
|
+
var langName = $m_Lio_kaitai_struct_languages_JavaScriptCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
76266
76621
|
this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
76267
76622
|
var ioName = ("_io_" + langName);
|
|
76268
76623
|
var args = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep);
|
|
@@ -76350,23 +76705,22 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classHeader__sci_List__s_Op
|
|
|
76350
76705
|
jsx$1.puts__T__V(((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1)) + ext) + " {"));
|
|
76351
76706
|
this.out$2.inc__V()
|
|
76352
76707
|
});
|
|
76708
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
76709
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
76710
|
+
this.out$2.puts__T__V("$i++;");
|
|
76711
|
+
this.out$2.dec__V();
|
|
76712
|
+
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
|
|
76713
|
+
});
|
|
76353
76714
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchEnd__V = (function() {
|
|
76354
76715
|
this.universalFooter__V()
|
|
76355
76716
|
});
|
|
76356
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.
|
|
76357
|
-
if ((needRaw.level__I() >= 1)) {
|
|
76358
|
-
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)) + " = [];"))
|
|
76359
|
-
};
|
|
76360
|
-
if ((needRaw.level__I() >= 2)) {
|
|
76361
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
76362
|
-
};
|
|
76363
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
|
|
76717
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
76364
76718
|
this.out$2.puts__T__V("$i = 0;");
|
|
76365
|
-
this.out$2.puts__T__V("
|
|
76719
|
+
this.out$2.puts__T__V((("while (!" + io) + "->isEof()) {"));
|
|
76366
76720
|
this.out$2.inc__V()
|
|
76367
76721
|
});
|
|
76368
76722
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
76369
|
-
return ("$" +
|
|
76723
|
+
return ("$" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
76370
76724
|
});
|
|
76371
76725
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T = (function(attrType) {
|
|
76372
76726
|
if ((attrType instanceof $c_Lio_kaitai_struct_datatype_DataType$IntType)) {
|
|
@@ -76426,6 +76780,15 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.kaitaiType2NativeType__Lio_
|
|
|
76426
76780
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
76427
76781
|
this.outHeader$2 = x$1
|
|
76428
76782
|
});
|
|
76783
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
76784
|
+
if ((needRaw.level__I() >= 1)) {
|
|
76785
|
+
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)) + " = [];"))
|
|
76786
|
+
};
|
|
76787
|
+
if ((needRaw.level__I() >= 2)) {
|
|
76788
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
76789
|
+
};
|
|
76790
|
+
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"))
|
|
76791
|
+
});
|
|
76429
76792
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
76430
76793
|
this.out$2.puts__T__V("if ($this->_m__is_le) {");
|
|
76431
76794
|
this.out$2.inc__V();
|
|
@@ -76438,19 +76801,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrParseHybrid__F0__F0__V
|
|
|
76438
76801
|
this.out$2.puts__T__V("}")
|
|
76439
76802
|
});
|
|
76440
76803
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
76441
|
-
this.out$2.puts__T__V((("public function " +
|
|
76442
|
-
this.out$2.inc__V()
|
|
76443
|
-
});
|
|
76444
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
76445
|
-
if ((needRaw.level__I() >= 1)) {
|
|
76446
|
-
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)) + " = [];"))
|
|
76447
|
-
};
|
|
76448
|
-
if ((needRaw.level__I() >= 2)) {
|
|
76449
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
76450
|
-
};
|
|
76451
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
|
|
76452
|
-
this.out$2.puts__T__V("$i = 0;");
|
|
76453
|
-
this.out$2.puts__T__V((("while (!" + io) + "->isEof()) {"));
|
|
76804
|
+
this.out$2.puts__T__V((("public function " + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
|
|
76454
76805
|
this.out$2.inc__V()
|
|
76455
76806
|
});
|
|
76456
76807
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
@@ -76466,7 +76817,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.privateMemberName__Lio_kait
|
|
|
76466
76817
|
if (x$5.equals__O__Z(id)) {
|
|
76467
76818
|
return "$this->_parent"
|
|
76468
76819
|
} else {
|
|
76469
|
-
return ("$this->_m_" +
|
|
76820
|
+
return ("$this->_m_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
76470
76821
|
}
|
|
76471
76822
|
}
|
|
76472
76823
|
}
|
|
@@ -76736,36 +77087,16 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attrParse2$default$7__s_Opt
|
|
|
76736
77087
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
76737
77088
|
this.out$2.puts__T__V((((id + " = ") + expr) + ";"))
|
|
76738
77089
|
});
|
|
76739
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.
|
|
76740
|
-
|
|
76741
|
-
|
|
76742
|
-
|
|
76743
|
-
return name
|
|
76744
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
76745
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
76746
|
-
var name$2 = x3.name$2;
|
|
76747
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
76748
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
76749
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
76750
|
-
var idx = x4.idx$2;
|
|
76751
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
76752
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
76753
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
76754
|
-
var name$3 = x5.name$2;
|
|
76755
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3)
|
|
76756
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
76757
|
-
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
76758
|
-
var innerId = x6.innerId$2;
|
|
76759
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
76760
|
-
} else {
|
|
76761
|
-
throw new $c_s_MatchError().init___O(id)
|
|
76762
|
-
}
|
|
77090
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
77091
|
+
this.out$2.puts__T__V((("$n = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
|
|
77092
|
+
this.out$2.puts__T__V("for ($i = 0; $i < $n; $i++) {");
|
|
77093
|
+
this.out$2.inc__V()
|
|
76763
77094
|
});
|
|
76764
77095
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
76765
77096
|
this.out$2.puts__T__V((io + "->alignToByte();"))
|
|
76766
77097
|
});
|
|
76767
77098
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
76768
|
-
return ("$_t_" +
|
|
77099
|
+
return ("$_t_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
76769
77100
|
});
|
|
76770
77101
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.out__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
76771
77102
|
return this.out$2
|
|
@@ -76796,7 +77127,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attributeDeclaration__Lio_k
|
|
|
76796
77127
|
}
|
|
76797
77128
|
};
|
|
76798
77129
|
if ((!jsx$1)) {
|
|
76799
|
-
this.out$2.puts__T__V((("protected $_m_" +
|
|
77130
|
+
this.out$2.puts__T__V((("protected $_m_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
76800
77131
|
}
|
|
76801
77132
|
});
|
|
76802
77133
|
$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) {
|
|
@@ -76816,7 +77147,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatEos__
|
|
|
76816
77147
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[] = ") + expr) + ";"))
|
|
76817
77148
|
});
|
|
76818
77149
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
76819
|
-
this.
|
|
77150
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
76820
77151
|
});
|
|
76821
77152
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
|
|
76822
77153
|
if ((endian instanceof $c_s_Some)) {
|
|
@@ -76854,6 +77185,11 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchCaseStart__Lio_kaitai
|
|
|
76854
77185
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.classConstructorFooter__V = (function() {
|
|
76855
77186
|
this.universalFooter__V()
|
|
76856
77187
|
});
|
|
77188
|
+
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
77189
|
+
this.out$2.puts__T__V("$i = 0;");
|
|
77190
|
+
this.out$2.puts__T__V("do {");
|
|
77191
|
+
this.out$2.inc__V()
|
|
77192
|
+
});
|
|
76857
77193
|
$c_Lio_kaitai_struct_languages_PHPCompiler.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) {
|
|
76858
77194
|
$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)
|
|
76859
77195
|
});
|
|
@@ -76895,18 +77231,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.io$kaitai$struct$languages$
|
|
|
76895
77231
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.readFooter__V = (function() {
|
|
76896
77232
|
this.universalFooter__V()
|
|
76897
77233
|
});
|
|
76898
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
76899
|
-
if ((needRaw.level__I() >= 1)) {
|
|
76900
|
-
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)) + " = [];"))
|
|
76901
|
-
};
|
|
76902
|
-
if ((needRaw.level__I() >= 2)) {
|
|
76903
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
76904
|
-
};
|
|
76905
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
|
|
76906
|
-
this.out$2.puts__T__V((("$n = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
|
|
76907
|
-
this.out$2.puts__T__V("for ($i = 0; $i < $n; $i++) {");
|
|
76908
|
-
this.out$2.inc__V()
|
|
76909
|
-
});
|
|
76910
77234
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
76911
77235
|
this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on);
|
|
76912
77236
|
this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"));
|
|
@@ -77119,12 +77443,6 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.translator__Lio_kaitai_stru
|
|
|
77119
77443
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
77120
77444
|
return this.translator$2
|
|
77121
77445
|
});
|
|
77122
|
-
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
77123
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
77124
|
-
this.out$2.puts__T__V("$i++;");
|
|
77125
|
-
this.out$2.dec__V();
|
|
77126
|
-
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"))
|
|
77127
|
-
});
|
|
77128
77446
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.universalFooter__V = (function() {
|
|
77129
77447
|
this.out$2.dec__V();
|
|
77130
77448
|
this.out$2.puts__T__V("}")
|
|
@@ -77137,7 +77455,7 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.instanceCalculate__Lio_kait
|
|
|
77137
77455
|
});
|
|
77138
77456
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(id, rep) {
|
|
77139
77457
|
this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
77140
|
-
var ioName = ("$_io_" +
|
|
77458
|
+
var ioName = ("$_io_" + $m_Lio_kaitai_struct_languages_PHPCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
77141
77459
|
var args = ((rep instanceof $c_Lio_kaitai_struct_format_RepeatUntil) ? this.translator$2.doLocalName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1) : this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(id, rep));
|
|
77142
77460
|
this.out$2.puts__T__V((((ioName + " = new \\Kaitai\\Struct\\Stream(") + args) + ");"));
|
|
77143
77461
|
return ioName
|
|
@@ -77151,7 +77469,9 @@ $c_Lio_kaitai_struct_languages_PHPCompiler.prototype.attributeReader__Lio_kaitai
|
|
|
77151
77469
|
var jsx$1 = x$3.equals__O__Z(attrName)
|
|
77152
77470
|
};
|
|
77153
77471
|
if ((!jsx$1)) {
|
|
77154
|
-
|
|
77472
|
+
var jsx$2 = this.out$2;
|
|
77473
|
+
var this$1 = $m_Lio_kaitai_struct_languages_PHPCompiler$();
|
|
77474
|
+
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)) + "; }"))
|
|
77155
77475
|
}
|
|
77156
77476
|
});
|
|
77157
77477
|
$c_Lio_kaitai_struct_languages_PHPCompiler.prototype.fileHeader__T__V = (function(topClassName) {
|
|
@@ -77194,18 +77514,16 @@ function $h_Lio_kaitai_struct_languages_PerlCompiler() {
|
|
|
77194
77514
|
/*<skip>*/
|
|
77195
77515
|
}
|
|
77196
77516
|
$h_Lio_kaitai_struct_languages_PerlCompiler.prototype = $c_Lio_kaitai_struct_languages_PerlCompiler.prototype;
|
|
77517
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
77518
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
77519
|
+
this.out$2.dec__V();
|
|
77520
|
+
this.out$2.puts__T__V((("} until (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ");"))
|
|
77521
|
+
});
|
|
77197
77522
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchEnd__V = (function() {
|
|
77198
77523
|
/*<skip>*/
|
|
77199
77524
|
});
|
|
77200
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.
|
|
77201
|
-
|
|
77202
|
-
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)) + " = ();"))
|
|
77203
|
-
};
|
|
77204
|
-
if ((needRaw.level__I() >= 2)) {
|
|
77205
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
|
|
77206
|
-
};
|
|
77207
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
|
|
77208
|
-
this.out$2.puts__T__V("do {");
|
|
77525
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
77526
|
+
this.out$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
|
|
77209
77527
|
this.out$2.inc__V()
|
|
77210
77528
|
});
|
|
77211
77529
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
@@ -77215,6 +77533,15 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchIfElseStart__V = (fu
|
|
|
77215
77533
|
this.out$2.puts__T__V("else {");
|
|
77216
77534
|
this.out$2.inc__V()
|
|
77217
77535
|
});
|
|
77536
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
77537
|
+
if ((needRaw.level__I() >= 1)) {
|
|
77538
|
+
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)) + " = ();"))
|
|
77539
|
+
};
|
|
77540
|
+
if ((needRaw.level__I() >= 2)) {
|
|
77541
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
|
|
77542
|
+
};
|
|
77543
|
+
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"))
|
|
77544
|
+
});
|
|
77218
77545
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
77219
77546
|
this.out$2.puts__T__V((("if (" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T($m_Lio_kaitai_struct_format_EndianIdentifier$())) + ") {"));
|
|
77220
77547
|
this.out$2.inc__V();
|
|
@@ -77236,23 +77563,12 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceHeader__sci_List__
|
|
|
77236
77563
|
this.out$2.inc__V();
|
|
77237
77564
|
this.out$2.puts__T__V("my ($self) = @_;")
|
|
77238
77565
|
});
|
|
77239
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
77240
|
-
if ((needRaw.level__I() >= 1)) {
|
|
77241
|
-
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)) + " = ();"))
|
|
77242
|
-
};
|
|
77243
|
-
if ((needRaw.level__I() >= 2)) {
|
|
77244
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
|
|
77245
|
-
};
|
|
77246
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
|
|
77247
|
-
this.out$2.puts__T__V((("while (!" + io) + "->is_eof()) {"));
|
|
77248
|
-
this.out$2.inc__V()
|
|
77249
|
-
});
|
|
77250
77566
|
$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) {
|
|
77251
77567
|
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));
|
|
77252
77568
|
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)) + ";"))
|
|
77253
77569
|
});
|
|
77254
77570
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
77255
|
-
return (("$self->{" +
|
|
77571
|
+
return (("$self->{" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "}")
|
|
77256
77572
|
});
|
|
77257
77573
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.seek__T__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(io, pos) {
|
|
77258
77574
|
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)) + ");"))
|
|
@@ -77419,35 +77735,17 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentTempVar__L
|
|
|
77419
77735
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attrParse2$default$7__s_Option = (function() {
|
|
77420
77736
|
return $m_s_None$()
|
|
77421
77737
|
});
|
|
77422
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.
|
|
77423
|
-
|
|
77424
|
-
|
|
77425
|
-
|
|
77426
|
-
|
|
77427
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
77428
|
-
var x3 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
77429
|
-
var idx = x3.idx$2;
|
|
77430
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
77431
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
77432
|
-
var x6 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
77433
|
-
return x6.name$2
|
|
77434
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
77435
|
-
var x4 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
77436
|
-
var inner = x4.innerId$2;
|
|
77437
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner))
|
|
77438
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
77439
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
77440
|
-
var name$2 = x5.name$2;
|
|
77441
|
-
return name$2
|
|
77442
|
-
} else {
|
|
77443
|
-
throw new $c_s_MatchError().init___O(id)
|
|
77444
|
-
}
|
|
77738
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
77739
|
+
var nVar = ("$n_" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
77740
|
+
this.out$2.puts__T__V((((("my " + nVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
|
|
77741
|
+
this.out$2.puts__T__V((("for (my $i = 0; $i < " + nVar) + "; $i++) {"));
|
|
77742
|
+
this.out$2.inc__V()
|
|
77445
77743
|
});
|
|
77446
77744
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
77447
77745
|
this.out$2.puts__T__V((io + "->align_to_byte();"))
|
|
77448
77746
|
});
|
|
77449
77747
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
77450
|
-
return ("$_t_" +
|
|
77748
|
+
return ("$_t_" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
77451
77749
|
});
|
|
77452
77750
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.out__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
77453
77751
|
return this.out$2
|
|
@@ -77495,7 +77793,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatEos_
|
|
|
77495
77793
|
this.out$2.puts__T__V((((("push @{" + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id)) + "}, ") + expr) + ";"))
|
|
77496
77794
|
});
|
|
77497
77795
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
77498
|
-
this.
|
|
77796
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
77499
77797
|
});
|
|
77500
77798
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
77501
77799
|
var this$1 = this.out$2;
|
|
@@ -77553,6 +77851,10 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.classConstructorFooter__V
|
|
|
77553
77851
|
this.out$2.puts__T__V("return $self;");
|
|
77554
77852
|
this.universalFooter__V()
|
|
77555
77853
|
});
|
|
77854
|
+
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
77855
|
+
this.out$2.puts__T__V("do {");
|
|
77856
|
+
this.out$2.inc__V()
|
|
77857
|
+
});
|
|
77556
77858
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.onComparisonExpr__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr$Compare = (function(condition) {
|
|
77557
77859
|
return new $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare().init___Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$cmpop__Lio_kaitai_struct_exprlang_Ast$expr(new $c_Lio_kaitai_struct_exprlang_Ast$expr$Name().init___Lio_kaitai_struct_exprlang_Ast$identifier(new $c_Lio_kaitai_struct_exprlang_Ast$identifier().init___T("_on")), $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$(), condition)
|
|
77558
77860
|
});
|
|
@@ -77596,19 +77898,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.io$kaitai$struct$languages
|
|
|
77596
77898
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.readFooter__V = (function() {
|
|
77597
77899
|
this.universalFooter__V()
|
|
77598
77900
|
});
|
|
77599
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
77600
|
-
if ((needRaw.level__I() >= 1)) {
|
|
77601
|
-
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)) + " = ();"))
|
|
77602
|
-
};
|
|
77603
|
-
if ((needRaw.level__I() >= 2)) {
|
|
77604
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = ();"))
|
|
77605
|
-
};
|
|
77606
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ();"));
|
|
77607
|
-
var nVar = ("$n_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
77608
|
-
this.out$2.puts__T__V((((("my " + nVar) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ";"));
|
|
77609
|
-
this.out$2.puts__T__V((("for (my $i = 0; $i < " + nVar) + "; $i++) {"));
|
|
77610
|
-
this.out$2.inc__V()
|
|
77611
|
-
});
|
|
77612
77901
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
77613
77902
|
/*<skip>*/
|
|
77614
77903
|
});
|
|
@@ -77756,11 +78045,6 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.translator__Lio_kaitai_str
|
|
|
77756
78045
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
77757
78046
|
return this.translator$2
|
|
77758
78047
|
});
|
|
77759
|
-
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
77760
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
77761
|
-
this.out$2.dec__V();
|
|
77762
|
-
this.out$2.puts__T__V((("} until (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ");"))
|
|
77763
|
-
});
|
|
77764
78048
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.universalFooter__V = (function() {
|
|
77765
78049
|
this.out$2.dec__V();
|
|
77766
78050
|
this.out$2.puts__T__V("}")
|
|
@@ -77774,7 +78058,7 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.instanceCalculate__Lio_kai
|
|
|
77774
78058
|
$c_Lio_kaitai_struct_languages_PerlCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(id, rep) {
|
|
77775
78059
|
this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
77776
78060
|
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(id, rep));
|
|
77777
|
-
var ioName = ("$io_" +
|
|
78061
|
+
var ioName = ("$io_" + $m_Lio_kaitai_struct_languages_PerlCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
77778
78062
|
this.out$2.puts__T__V((((((("my " + ioName) + " = ") + $m_Lio_kaitai_struct_languages_PerlCompiler$().kstreamName__T()) + "->new(") + args) + ");"));
|
|
77779
78063
|
return ioName
|
|
77780
78064
|
});
|
|
@@ -77801,7 +78085,9 @@ $c_Lio_kaitai_struct_languages_PerlCompiler.prototype.attributeReader__Lio_kaita
|
|
|
77801
78085
|
if ((!jsx$1)) {
|
|
77802
78086
|
var this$1 = this.out$2;
|
|
77803
78087
|
this$1.sb$2.append__T__scm_StringBuilder("\n");
|
|
77804
|
-
|
|
78088
|
+
var jsx$2 = this.out$2;
|
|
78089
|
+
var this$2 = $m_Lio_kaitai_struct_languages_PerlCompiler$();
|
|
78090
|
+
jsx$2.puts__T__V((("sub " + this$2.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + " {"));
|
|
77805
78091
|
this.out$2.inc__V();
|
|
77806
78092
|
this.out$2.puts__T__V("my ($self) = @_;");
|
|
77807
78093
|
this.out$2.puts__T__V((("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
@@ -77865,21 +78151,20 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__s_O
|
|
|
77865
78151
|
this.out$2.puts__T__V("#[derive(Default)]");
|
|
77866
78152
|
this.out$2.puts__T__V((("pub struct " + $m_Lio_kaitai_struct_languages_RustCompiler$().types2classRel__sci_List__T(name)) + " {"))
|
|
77867
78153
|
});
|
|
78154
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
78155
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
78156
|
+
this.out$2.puts__T__V((("!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ")"));
|
|
78157
|
+
this.out$2.dec__V();
|
|
78158
|
+
this.out$2.puts__T__V("} { }")
|
|
78159
|
+
});
|
|
77868
78160
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchEnd__V = (function() {
|
|
77869
78161
|
this.universalFooter__V()
|
|
77870
78162
|
});
|
|
77871
78163
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
77872
78164
|
this.out$2.puts__T__V(((((" pub " + this.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ": Option<") + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(attrType)) + ">,"))
|
|
77873
78165
|
});
|
|
77874
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.
|
|
77875
|
-
|
|
77876
|
-
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)) + " = vec!();"))
|
|
77877
|
-
};
|
|
77878
|
-
if ((needRaw.level__I() >= 2)) {
|
|
77879
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = vec!();"))
|
|
77880
|
-
};
|
|
77881
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"));
|
|
77882
|
-
this.out$2.puts__T__V("while {");
|
|
78166
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
78167
|
+
this.out$2.puts__T__V((("while !" + io) + ".isEof() {"));
|
|
77883
78168
|
this.out$2.inc__V()
|
|
77884
78169
|
});
|
|
77885
78170
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
@@ -78091,6 +78376,15 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.kaitaiType2NativeType__Lio
|
|
|
78091
78376
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
78092
78377
|
this.outHeader$2 = x$1
|
|
78093
78378
|
});
|
|
78379
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
78380
|
+
if ((needRaw.level__I() >= 1)) {
|
|
78381
|
+
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)) + " = vec!();"))
|
|
78382
|
+
};
|
|
78383
|
+
if ((needRaw.level__I() >= 2)) {
|
|
78384
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = vec!();"))
|
|
78385
|
+
};
|
|
78386
|
+
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"))
|
|
78387
|
+
});
|
|
78094
78388
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
78095
78389
|
this.out$2.puts__T__V("if ($this->_m__is_le) {");
|
|
78096
78390
|
this.out$2.inc__V();
|
|
@@ -78106,17 +78400,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.instanceHeader__sci_List__
|
|
|
78106
78400
|
this.out$2.puts__T__V((((("fn " + this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "(&mut self) -> ") + this.kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " {"));
|
|
78107
78401
|
this.out$2.inc__V()
|
|
78108
78402
|
});
|
|
78109
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
78110
|
-
if ((needRaw.level__I() >= 1)) {
|
|
78111
|
-
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)) + " = [];"))
|
|
78112
|
-
};
|
|
78113
|
-
if ((needRaw.level__I() >= 2)) {
|
|
78114
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [];"))
|
|
78115
|
-
};
|
|
78116
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [];"));
|
|
78117
|
-
this.out$2.puts__T__V((("while !" + io) + ".isEof() {"));
|
|
78118
|
-
this.out$2.inc__V()
|
|
78119
|
-
});
|
|
78120
78403
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
78121
78404
|
var x = $m_Lio_kaitai_struct_format_IoIdentifier$();
|
|
78122
78405
|
if (x.equals__O__Z(id)) {
|
|
@@ -78371,6 +78654,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.idToStr__Lio_kaitai_struct
|
|
|
78371
78654
|
throw new $c_s_MatchError().init___O(id)
|
|
78372
78655
|
}
|
|
78373
78656
|
});
|
|
78657
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
78658
|
+
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)) + " {"));
|
|
78659
|
+
this.out$2.inc__V()
|
|
78660
|
+
});
|
|
78374
78661
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
78375
78662
|
this.out$2.puts__T__V((io + ".alignToByte();"))
|
|
78376
78663
|
});
|
|
@@ -78395,7 +78682,7 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchCaseEnd__V = (functi
|
|
|
78395
78682
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
78396
78683
|
var tempVar = (isRaw ? this.translator$2.doLocalName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1) : this.translator$2.doLocalName__T__T($m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1));
|
|
78397
78684
|
this.out$2.puts__T__V((((("let " + tempVar) + " = ") + expr) + ";"));
|
|
78398
|
-
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") +
|
|
78685
|
+
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + tempVar) + ");"))
|
|
78399
78686
|
});
|
|
78400
78687
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
|
|
78401
78688
|
var this$1 = classSpec.name$1;
|
|
@@ -78443,10 +78730,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.condIfHeader__Lio_kaitai_s
|
|
|
78443
78730
|
this.out$2.inc__V()
|
|
78444
78731
|
});
|
|
78445
78732
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
78446
|
-
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".
|
|
78733
|
+
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ");"))
|
|
78447
78734
|
});
|
|
78448
78735
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
78449
|
-
this.
|
|
78736
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
78450
78737
|
});
|
|
78451
78738
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
78452
78739
|
this.classHeader__sci_List__s_Option__V(name, new $c_s_Some().init___O("&Option<Box<KaitaiStruct>>"))
|
|
@@ -78480,6 +78767,10 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchCaseStart__Lio_kaita
|
|
|
78480
78767
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.classConstructorFooter__V = (function() {
|
|
78481
78768
|
this.universalFooter__V()
|
|
78482
78769
|
});
|
|
78770
|
+
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
78771
|
+
this.out$2.puts__T__V("while {");
|
|
78772
|
+
this.out$2.inc__V()
|
|
78773
|
+
});
|
|
78483
78774
|
$c_Lio_kaitai_struct_languages_RustCompiler.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) {
|
|
78484
78775
|
$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)
|
|
78485
78776
|
});
|
|
@@ -78519,17 +78810,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.readFooter__V = (function(
|
|
|
78519
78810
|
this.out$2.dec__V();
|
|
78520
78811
|
this.out$2.puts__T__V("}")
|
|
78521
78812
|
});
|
|
78522
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
78523
|
-
if ((needRaw.level__I() >= 1)) {
|
|
78524
|
-
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)) + " = vec!();"))
|
|
78525
|
-
};
|
|
78526
|
-
if ((needRaw.level__I() >= 2)) {
|
|
78527
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = vec!();"))
|
|
78528
|
-
};
|
|
78529
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = vec!();"));
|
|
78530
|
-
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)) + " {"));
|
|
78531
|
-
this.out$2.inc__V()
|
|
78532
|
-
});
|
|
78533
78813
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
78534
78814
|
var onType = this.translator$2.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(on);
|
|
78535
78815
|
this.switchIfs$2 = ((onType instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream) || (onType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType));
|
|
@@ -78729,12 +79009,6 @@ $c_Lio_kaitai_struct_languages_RustCompiler.prototype.translator__Lio_kaitai_str
|
|
|
78729
79009
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
78730
79010
|
return this.translator$2
|
|
78731
79011
|
});
|
|
78732
|
-
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
78733
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
78734
|
-
this.out$2.puts__T__V((("!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ")"));
|
|
78735
|
-
this.out$2.dec__V();
|
|
78736
|
-
this.out$2.puts__T__V("} { }")
|
|
78737
|
-
});
|
|
78738
79012
|
$c_Lio_kaitai_struct_languages_RustCompiler.prototype.universalFooter__V = (function() {
|
|
78739
79013
|
this.out$2.dec__V();
|
|
78740
79014
|
this.out$2.puts__T__V("}")
|
|
@@ -78824,36 +79098,34 @@ function $h_Lio_kaitai_struct_languages_CSharpCompiler() {
|
|
|
78824
79098
|
/*<skip>*/
|
|
78825
79099
|
}
|
|
78826
79100
|
$h_Lio_kaitai_struct_languages_CSharpCompiler.prototype = $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype;
|
|
78827
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.
|
|
79101
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
79102
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
79103
|
+
this.out$2.puts__T__V("i++;");
|
|
79104
|
+
this.out$2.dec__V();
|
|
79105
|
+
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
|
|
79106
|
+
this.out$2.dec__V();
|
|
78828
79107
|
this.out$2.puts__T__V("}")
|
|
78829
79108
|
});
|
|
78830
79109
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
78831
79110
|
this.out$2.puts__T__V((("private bool " + this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
78832
79111
|
this.out$2.puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
78833
79112
|
});
|
|
79113
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchEnd__V = (function() {
|
|
79114
|
+
this.out$2.puts__T__V("}")
|
|
79115
|
+
});
|
|
78834
79116
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
78835
|
-
this.out$2.puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_datatype_DataType__Z__T(dataType, isNullable)) + " ") +
|
|
79117
|
+
this.out$2.puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_datatype_DataType__Z__T(dataType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
|
|
78836
79118
|
this.out$2.puts__T__V("{");
|
|
78837
79119
|
this.out$2.inc__V();
|
|
78838
79120
|
this.out$2.puts__T__V("get");
|
|
78839
79121
|
this.out$2.puts__T__V("{");
|
|
78840
79122
|
this.out$2.inc__V()
|
|
78841
79123
|
});
|
|
78842
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.
|
|
78843
|
-
var this$1 = this.importList$2;
|
|
78844
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
|
|
78845
|
-
if ((needRaw.level__I() >= 1)) {
|
|
78846
|
-
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)) + " = new List<byte[]>();"))
|
|
78847
|
-
};
|
|
78848
|
-
if ((needRaw.level__I() >= 2)) {
|
|
78849
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>();"))
|
|
78850
|
-
};
|
|
78851
|
-
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "();"));
|
|
79124
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
78852
79125
|
this.out$2.puts__T__V("{");
|
|
78853
79126
|
this.out$2.inc__V();
|
|
78854
79127
|
this.out$2.puts__T__V("var i = 0;");
|
|
78855
|
-
this.out$2.puts__T__V((((
|
|
78856
|
-
this.out$2.puts__T__V("do {");
|
|
79128
|
+
this.out$2.puts__T__V((("while (!" + io) + ".IsEof) {"));
|
|
78857
79129
|
this.out$2.inc__V()
|
|
78858
79130
|
});
|
|
78859
79131
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.paramName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
@@ -78867,6 +79139,17 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfElseStart__V = (
|
|
|
78867
79139
|
this.out$2.puts__T__V("{");
|
|
78868
79140
|
this.out$2.inc__V()
|
|
78869
79141
|
});
|
|
79142
|
+
$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) {
|
|
79143
|
+
var this$1 = this.importList$2;
|
|
79144
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
|
|
79145
|
+
if ((needRaw.level__I() >= 1)) {
|
|
79146
|
+
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)) + " = new List<byte[]>();"))
|
|
79147
|
+
};
|
|
79148
|
+
if ((needRaw.level__I() >= 2)) {
|
|
79149
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>();"))
|
|
79150
|
+
};
|
|
79151
|
+
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "();"))
|
|
79152
|
+
});
|
|
78870
79153
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classHeader__T__V = (function(name) {
|
|
78871
79154
|
this.out$2.puts__T__V((("public partial class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " : KaitaiStruct"));
|
|
78872
79155
|
this.out$2.puts__T__V("{");
|
|
@@ -78899,22 +79182,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchCasesUsingIf__Lio_
|
|
|
78899
79182
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
78900
79183
|
this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
|
|
78901
79184
|
});
|
|
78902
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
78903
|
-
var this$1 = this.importList$2;
|
|
78904
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
|
|
78905
|
-
if ((needRaw.level__I() >= 1)) {
|
|
78906
|
-
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)) + " = new List<byte[]>();"))
|
|
78907
|
-
};
|
|
78908
|
-
if ((needRaw.level__I() >= 2)) {
|
|
78909
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>();"))
|
|
78910
|
-
};
|
|
78911
|
-
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "();"));
|
|
78912
|
-
this.out$2.puts__T__V("{");
|
|
78913
|
-
this.out$2.inc__V();
|
|
78914
|
-
this.out$2.puts__T__V("var i = 0;");
|
|
78915
|
-
this.out$2.puts__T__V((("while (!" + io) + ".IsEof) {"));
|
|
78916
|
-
this.out$2.inc__V()
|
|
78917
|
-
});
|
|
78918
79185
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
78919
79186
|
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
78920
79187
|
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
@@ -79196,6 +79463,11 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.idToStr__Lio_kaitai_stru
|
|
|
79196
79463
|
throw new $c_s_MatchError().init___O(id)
|
|
79197
79464
|
}
|
|
79198
79465
|
});
|
|
79466
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
79467
|
+
this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++)"));
|
|
79468
|
+
this.out$2.puts__T__V("{");
|
|
79469
|
+
this.out$2.inc__V()
|
|
79470
|
+
});
|
|
79199
79471
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
79200
79472
|
return ("_t_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
79201
79473
|
});
|
|
@@ -79245,7 +79517,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatEo
|
|
|
79245
79517
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".Add(") + expr) + ");"))
|
|
79246
79518
|
});
|
|
79247
79519
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
79248
|
-
this.
|
|
79520
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
79249
79521
|
});
|
|
79250
79522
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
|
|
79251
79523
|
var readAccessAndType = ((!this.config$1.autoRead$1) ? "public" : "private");
|
|
@@ -79279,6 +79551,14 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchCaseStart__Lio_kai
|
|
|
79279
79551
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorFooter__V = (function() {
|
|
79280
79552
|
this.fileFooter__T__V(null)
|
|
79281
79553
|
});
|
|
79554
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
79555
|
+
this.out$2.puts__T__V("{");
|
|
79556
|
+
this.out$2.inc__V();
|
|
79557
|
+
this.out$2.puts__T__V("var i = 0;");
|
|
79558
|
+
this.out$2.puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
|
|
79559
|
+
this.out$2.puts__T__V("do {");
|
|
79560
|
+
this.out$2.inc__V()
|
|
79561
|
+
});
|
|
79282
79562
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.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) {
|
|
79283
79563
|
$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)
|
|
79284
79564
|
});
|
|
@@ -79324,20 +79604,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.io$kaitai$struct$languag
|
|
|
79324
79604
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readFooter__V = (function() {
|
|
79325
79605
|
this.fileFooter__T__V("")
|
|
79326
79606
|
});
|
|
79327
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
79328
|
-
var this$1 = this.importList$2;
|
|
79329
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "System.Collections.Generic");
|
|
79330
|
-
if ((needRaw.level__I() >= 1)) {
|
|
79331
|
-
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)) + " = new List<byte[]>((int) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "));"))
|
|
79332
|
-
};
|
|
79333
|
-
if ((needRaw.level__I() >= 2)) {
|
|
79334
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new List<byte[]>((int) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "));"))
|
|
79335
|
-
};
|
|
79336
|
-
this.out$2.puts__T__V((((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType))) + "((int) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "));"));
|
|
79337
|
-
this.out$2.puts__T__V((("for (var i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++)"));
|
|
79338
|
-
this.out$2.puts__T__V("{");
|
|
79339
|
-
this.out$2.inc__V()
|
|
79340
|
-
});
|
|
79341
79607
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
79342
79608
|
this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
|
|
79343
79609
|
});
|
|
@@ -79409,33 +79675,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeDoc__Lio_kaitai
|
|
|
79409
79675
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attrDebugEnd__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__T__Lio_kaitai_struct_format_RepeatSpec__V = (function(attrName, attrType, io, repeat) {
|
|
79410
79676
|
/*<skip>*/
|
|
79411
79677
|
});
|
|
79412
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
79413
|
-
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
79414
|
-
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
79415
|
-
var name = x2.name$2;
|
|
79416
|
-
return ("M" + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name))
|
|
79417
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
79418
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
79419
|
-
var name$2 = x3.name$2;
|
|
79420
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$2)
|
|
79421
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
79422
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
79423
|
-
var idx = x4.idx$2;
|
|
79424
|
-
var x = $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1;
|
|
79425
|
-
var this$2 = new $c_sci_StringOps().init___T(x);
|
|
79426
|
-
return (($f_sci_StringLike__capitalize__T(this$2) + "_") + idx)
|
|
79427
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
79428
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
79429
|
-
var name$3 = x5.name$2;
|
|
79430
|
-
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$3)
|
|
79431
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
79432
|
-
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
79433
|
-
var innerId = x6.innerId$2;
|
|
79434
|
-
return ("M_Raw" + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
79435
|
-
} else {
|
|
79436
|
-
throw new $c_s_MatchError().init___O(id)
|
|
79437
|
-
}
|
|
79438
|
-
});
|
|
79439
79678
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.bytesPadTermExpr__T__s_Option__s_Option__Z__T = (function(expr0, padRight, terminator, include) {
|
|
79440
79679
|
if ((padRight instanceof $c_s_Some)) {
|
|
79441
79680
|
var x2 = $as_s_Some(padRight);
|
|
@@ -79666,14 +79905,6 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
79666
79905
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.flagForInstName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
|
|
79667
79906
|
return ("f_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
|
|
79668
79907
|
});
|
|
79669
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
79670
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
79671
|
-
this.out$2.puts__T__V("i++;");
|
|
79672
|
-
this.out$2.dec__V();
|
|
79673
|
-
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
|
|
79674
|
-
this.out$2.dec__V();
|
|
79675
|
-
this.out$2.puts__T__V("}")
|
|
79676
|
-
});
|
|
79677
79908
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
79678
79909
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, (((("(" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_datatype_DataType__T(dataType)) + ") (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ")"))
|
|
79679
79910
|
});
|
|
@@ -79710,7 +79941,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.fileHeader__T__V = (func
|
|
|
79710
79941
|
this.out$2.inc__V()
|
|
79711
79942
|
});
|
|
79712
79943
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
79713
|
-
this.out$2.puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") +
|
|
79944
|
+
this.out$2.puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + " { get { return ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; } }"))
|
|
79714
79945
|
});
|
|
79715
79946
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceClear__Lio_kaitai_struct_format_InstanceIdentifier__V = (function(instName) {
|
|
79716
79947
|
this.out$2.puts__T__V((this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(instName) + " = false;"))
|
|
@@ -79752,19 +79983,24 @@ function $h_Lio_kaitai_struct_languages_LuaCompiler() {
|
|
|
79752
79983
|
/*<skip>*/
|
|
79753
79984
|
}
|
|
79754
79985
|
$h_Lio_kaitai_struct_languages_LuaCompiler.prototype = $c_Lio_kaitai_struct_languages_LuaCompiler.prototype;
|
|
79986
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
79987
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
79988
|
+
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " then"));
|
|
79989
|
+
this.out$2.inc__V();
|
|
79990
|
+
this.out$2.puts__T__V("break");
|
|
79991
|
+
this.out$2.dec__V();
|
|
79992
|
+
this.out$2.puts__T__V("end");
|
|
79993
|
+
this.out$2.puts__T__V("i = i + 1");
|
|
79994
|
+
this.out$2.dec__V();
|
|
79995
|
+
this.out$2.puts__T__V("end");
|
|
79996
|
+
this.out$2.dec__V()
|
|
79997
|
+
});
|
|
79755
79998
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchEnd__V = (function() {
|
|
79756
79999
|
/*<skip>*/
|
|
79757
80000
|
});
|
|
79758
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.
|
|
79759
|
-
if ((needRaw.level__I() >= 1)) {
|
|
79760
|
-
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)) + " = {}"))
|
|
79761
|
-
};
|
|
79762
|
-
if ((needRaw.level__I() >= 2)) {
|
|
79763
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
|
|
79764
|
-
};
|
|
79765
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
|
|
80001
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
79766
80002
|
this.out$2.puts__T__V("local i = 0");
|
|
79767
|
-
this.out$2.puts__T__V("while
|
|
80003
|
+
this.out$2.puts__T__V((("while not " + io) + ":is_eof() do"));
|
|
79768
80004
|
this.out$2.inc__V()
|
|
79769
80005
|
});
|
|
79770
80006
|
$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) {
|
|
@@ -79774,6 +80010,15 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfElseStart__V = (fun
|
|
|
79774
80010
|
this.out$2.puts__T__V("else");
|
|
79775
80011
|
this.out$2.inc__V()
|
|
79776
80012
|
});
|
|
80013
|
+
$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) {
|
|
80014
|
+
if ((needRaw.level__I() >= 1)) {
|
|
80015
|
+
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)) + " = {}"))
|
|
80016
|
+
};
|
|
80017
|
+
if ((needRaw.level__I() >= 2)) {
|
|
80018
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
|
|
80019
|
+
};
|
|
80020
|
+
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"))
|
|
80021
|
+
});
|
|
79777
80022
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrParseHybrid__F0__F0__V = (function(leProc, beProc) {
|
|
79778
80023
|
this.out$2.puts__T__V("if self._is_le then");
|
|
79779
80024
|
this.out$2.inc__V();
|
|
@@ -79789,24 +80034,12 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchCasesUsingIf__Lio_kai
|
|
|
79789
80034
|
$f_Lio_kaitai_struct_languages_components_SwitchIfOps__switchCasesUsingIf__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__sci_Map__F1__F1__V(this, id, on, onType, cases, normalCaseProc, elseCaseProc)
|
|
79790
80035
|
});
|
|
79791
80036
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
79792
|
-
this.out$2.puts__T__V(((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className) + ".property.") +
|
|
79793
|
-
this.out$2.puts__T__V((((("function " + $m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className)) + ".property.") +
|
|
79794
|
-
this.out$2.inc__V()
|
|
79795
|
-
});
|
|
79796
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
79797
|
-
if ((needRaw.level__I() >= 1)) {
|
|
79798
|
-
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)) + " = {}"))
|
|
79799
|
-
};
|
|
79800
|
-
if ((needRaw.level__I() >= 2)) {
|
|
79801
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
|
|
79802
|
-
};
|
|
79803
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
|
|
79804
|
-
this.out$2.puts__T__V("local i = 0");
|
|
79805
|
-
this.out$2.puts__T__V((("while not " + io) + ":is_eof() do"));
|
|
80037
|
+
this.out$2.puts__T__V(((($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className) + ".property.") + $m_Lio_kaitai_struct_languages_LuaCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " = {}"));
|
|
80038
|
+
this.out$2.puts__T__V((((("function " + $m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(className)) + ".property.") + $m_Lio_kaitai_struct_languages_LuaCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ":get()"));
|
|
79806
80039
|
this.out$2.inc__V()
|
|
79807
80040
|
});
|
|
79808
80041
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
79809
|
-
return ("self." +
|
|
80042
|
+
return ("self." + $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
79810
80043
|
});
|
|
79811
80044
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
|
|
79812
80045
|
this.out$2.puts__T__V(("local _on = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)))
|
|
@@ -79893,7 +80126,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classConstructorHeader__sci
|
|
|
79893
80126
|
return (function(p$2) {
|
|
79894
80127
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
79895
80128
|
var id = p.id$1;
|
|
79896
|
-
return $
|
|
80129
|
+
return $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
79897
80130
|
})
|
|
79898
80131
|
})(this);
|
|
79899
80132
|
var this$1 = $m_sci_List$();
|
|
@@ -79942,7 +80175,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classConstructorHeader__sci
|
|
|
79942
80175
|
var p$3 = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$3);
|
|
79943
80176
|
var jsx$3 = p$3.id$1;
|
|
79944
80177
|
var id$1 = p$3.id$1;
|
|
79945
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$3,
|
|
80178
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$3, $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1));
|
|
79946
80179
|
var this$4 = these$1;
|
|
79947
80180
|
these$1 = this$4.tail__sci_List()
|
|
79948
80181
|
}
|
|
@@ -80068,38 +80301,17 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrParse2$default$7__s_Opt
|
|
|
80068
80301
|
return $m_s_None$()
|
|
80069
80302
|
});
|
|
80070
80303
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
80071
|
-
$
|
|
80304
|
+
this.out$2.puts__T__V(((("local " + id) + " = ") + expr))
|
|
80072
80305
|
});
|
|
80073
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.
|
|
80074
|
-
|
|
80075
|
-
|
|
80076
|
-
var name = x2.name$2;
|
|
80077
|
-
return name
|
|
80078
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
80079
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
80080
|
-
var name$2 = x3.name$2;
|
|
80081
|
-
return name$2
|
|
80082
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
80083
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
80084
|
-
var idx = x4.idx$2;
|
|
80085
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
80086
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
80087
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
80088
|
-
var name$3 = x5.name$2;
|
|
80089
|
-
return ("_m_" + name$3)
|
|
80090
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
80091
|
-
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
80092
|
-
var innerId = x6.innerId$2;
|
|
80093
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
80094
|
-
} else {
|
|
80095
|
-
throw new $c_s_MatchError().init___O(id)
|
|
80096
|
-
}
|
|
80306
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
80307
|
+
this.out$2.puts__T__V((("for i = 0, " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + " - 1 do"));
|
|
80308
|
+
this.out$2.inc__V()
|
|
80097
80309
|
});
|
|
80098
80310
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
80099
80311
|
this.out$2.puts__T__V((io + ":align_to_byte()"))
|
|
80100
80312
|
});
|
|
80101
80313
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
80102
|
-
return ("_t_" +
|
|
80314
|
+
return ("_t_" + $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
80103
80315
|
});
|
|
80104
80316
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.out__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
80105
80317
|
return this.out$2
|
|
@@ -80112,7 +80324,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchCaseEnd__V = (functio
|
|
|
80112
80324
|
});
|
|
80113
80325
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatUntil__Lio_kaitai_struct_format_Identifier__T__Z__V = (function(id, expr, isRaw) {
|
|
80114
80326
|
var s = (isRaw ? $m_Lio_kaitai_struct_format_Identifier$().ITERATOR2$1 : $m_Lio_kaitai_struct_format_Identifier$().ITERATOR$1);
|
|
80115
|
-
this.out$2.puts__T__V(((s + " = ") + expr));
|
|
80327
|
+
this.out$2.puts__T__V(((("local " + s) + " = ") + expr));
|
|
80116
80328
|
this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i + 1] = ") + s))
|
|
80117
80329
|
});
|
|
80118
80330
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.opaqueClassDeclaration__Lio_kaitai_struct_format_ClassSpec__V = (function(classSpec) {
|
|
@@ -80140,11 +80352,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatEos__
|
|
|
80140
80352
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
80141
80353
|
this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + "[i + 1] = ") + expr))
|
|
80142
80354
|
});
|
|
80143
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
80144
|
-
this.out$2.puts__T__V(($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(name) + " = class.class(KaitaiStruct)"));
|
|
80145
|
-
var this$1 = this.out$2;
|
|
80146
|
-
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
80147
|
-
});
|
|
80148
80355
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
|
|
80149
80356
|
if ((endian instanceof $c_s_Some)) {
|
|
80150
80357
|
var x2 = $as_s_Some(endian);
|
|
@@ -80160,6 +80367,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.readHeader__s_Option__Z__V
|
|
|
80160
80367
|
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) + "()"));
|
|
80161
80368
|
this.out$2.inc__V()
|
|
80162
80369
|
});
|
|
80370
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
80371
|
+
this.out$2.puts__T__V(($m_Lio_kaitai_struct_languages_LuaCompiler$().types2class__sci_List__T(name) + " = class.class(KaitaiStruct)"));
|
|
80372
|
+
var this$1 = this.out$2;
|
|
80373
|
+
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
80374
|
+
});
|
|
80163
80375
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.results__Lio_kaitai_struct_format_ClassSpec__sci_Map = (function(topClass) {
|
|
80164
80376
|
return $f_Lio_kaitai_struct_languages_components_SingleOutputFile__results__Lio_kaitai_struct_format_ClassSpec__sci_Map(this, topClass)
|
|
80165
80377
|
});
|
|
@@ -80175,6 +80387,11 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.classConstructorFooter__V =
|
|
|
80175
80387
|
var this$1 = this.out$2;
|
|
80176
80388
|
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
80177
80389
|
});
|
|
80390
|
+
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
80391
|
+
this.out$2.puts__T__V("local i = 0");
|
|
80392
|
+
this.out$2.puts__T__V("while true do");
|
|
80393
|
+
this.out$2.inc__V()
|
|
80394
|
+
});
|
|
80178
80395
|
$c_Lio_kaitai_struct_languages_LuaCompiler.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) {
|
|
80179
80396
|
$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)
|
|
80180
80397
|
});
|
|
@@ -80219,17 +80436,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.readFooter__V = (function()
|
|
|
80219
80436
|
var this$1 = this.out$2;
|
|
80220
80437
|
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
80221
80438
|
});
|
|
80222
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
80223
|
-
if ((needRaw.level__I() >= 1)) {
|
|
80224
|
-
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)) + " = {}"))
|
|
80225
|
-
};
|
|
80226
|
-
if ((needRaw.level__I() >= 2)) {
|
|
80227
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = {}"))
|
|
80228
|
-
};
|
|
80229
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = {}"));
|
|
80230
|
-
this.out$2.puts__T__V((("for i = 0, " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + " - 1 do"));
|
|
80231
|
-
this.out$2.inc__V()
|
|
80232
|
-
});
|
|
80233
80439
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
80234
80440
|
/*<skip>*/
|
|
80235
80441
|
});
|
|
@@ -80349,27 +80555,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attributeDoc__Lio_kaitai_st
|
|
|
80349
80555
|
$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) {
|
|
80350
80556
|
/*<skip>*/
|
|
80351
80557
|
});
|
|
80352
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
80353
|
-
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
80354
|
-
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
80355
|
-
var name = x2.name$2;
|
|
80356
|
-
return name
|
|
80357
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
80358
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
80359
|
-
var name$2 = x3.name$2;
|
|
80360
|
-
return name$2
|
|
80361
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
80362
|
-
var x4 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
80363
|
-
var name$3 = x4.name$2;
|
|
80364
|
-
return name$3
|
|
80365
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
80366
|
-
var x5 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
80367
|
-
var innerId = x5.innerId$2;
|
|
80368
|
-
return ("_raw_" + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
80369
|
-
} else {
|
|
80370
|
-
throw new $c_s_MatchError().init___O(id)
|
|
80371
|
-
}
|
|
80372
|
-
});
|
|
80373
80558
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.bytesPadTermExpr__T__s_Option__s_Option__Z__T = (function(expr0, padRight, terminator, include) {
|
|
80374
80559
|
if ((padRight instanceof $c_s_Some)) {
|
|
80375
80560
|
var x2 = $as_s_Some(padRight);
|
|
@@ -80444,7 +80629,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.switchIfCaseFirstStart__Lio
|
|
|
80444
80629
|
this.out$2.inc__V()
|
|
80445
80630
|
});
|
|
80446
80631
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
80447
|
-
this.out$2.puts__T__V((("if self." +
|
|
80632
|
+
this.out$2.puts__T__V((("if self." + $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + " ~= nil then"));
|
|
80448
80633
|
this.out$2.inc__V();
|
|
80449
80634
|
this.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
|
|
80450
80635
|
this.out$2.dec__V();
|
|
@@ -80476,9 +80661,8 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
80476
80661
|
} else {
|
|
80477
80662
|
var x = $m_Lio_kaitai_struct_format_ProcessZlib$();
|
|
80478
80663
|
if ((x === proc)) {
|
|
80479
|
-
|
|
80480
|
-
}
|
|
80481
|
-
if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
|
|
80664
|
+
var expr$2 = (("KaitaiStream.process_zlib(" + srcExpr) + ")")
|
|
80665
|
+
} else if ((proc instanceof $c_Lio_kaitai_struct_format_ProcessRotate)) {
|
|
80482
80666
|
var x3 = $as_Lio_kaitai_struct_format_ProcessRotate(proc);
|
|
80483
80667
|
var isLeft = x3.left$1;
|
|
80484
80668
|
var rotValue = x3.key$1;
|
|
@@ -80491,7 +80675,7 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.attrProcess__Lio_kaitai_str
|
|
|
80491
80675
|
var x4 = $as_Lio_kaitai_struct_format_ProcessCustom(proc);
|
|
80492
80676
|
var name = x4.name$1;
|
|
80493
80677
|
var args = x4.args$1;
|
|
80494
|
-
var procName$2 = ("_process_" +
|
|
80678
|
+
var procName$2 = ("_process_" + $m_Lio_kaitai_struct_languages_LuaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
80495
80679
|
var this$1 = this.importList$2;
|
|
80496
80680
|
var s = ((("require(\"" + "") + $f_sc_LinearSeqOptimized__last__O(name)) + "\")");
|
|
80497
80681
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, s);
|
|
@@ -80520,18 +80704,6 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.translator__Lio_kaitai_stru
|
|
|
80520
80704
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
80521
80705
|
return this.translator$2
|
|
80522
80706
|
});
|
|
80523
|
-
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
80524
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
80525
|
-
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + " then"));
|
|
80526
|
-
this.out$2.inc__V();
|
|
80527
|
-
this.out$2.puts__T__V("break");
|
|
80528
|
-
this.out$2.dec__V();
|
|
80529
|
-
this.out$2.puts__T__V("end");
|
|
80530
|
-
this.out$2.puts__T__V("i = i + 1");
|
|
80531
|
-
this.out$2.dec__V();
|
|
80532
|
-
this.out$2.puts__T__V("end");
|
|
80533
|
-
this.out$2.dec__V()
|
|
80534
|
-
});
|
|
80535
80707
|
$c_Lio_kaitai_struct_languages_LuaCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
80536
80708
|
return this.outHeader$2
|
|
80537
80709
|
});
|
|
@@ -80599,6 +80771,16 @@ function $h_Lio_kaitai_struct_languages_NimCompiler() {
|
|
|
80599
80771
|
/*<skip>*/
|
|
80600
80772
|
}
|
|
80601
80773
|
$h_Lio_kaitai_struct_languages_NimCompiler.prototype = $c_Lio_kaitai_struct_languages_NimCompiler.prototype;
|
|
80774
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
80775
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
80776
|
+
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
|
|
80777
|
+
this.out$2.inc__V();
|
|
80778
|
+
this.out$2.puts__T__V("break");
|
|
80779
|
+
this.out$2.dec__V();
|
|
80780
|
+
this.out$2.puts__T__V("inc i");
|
|
80781
|
+
this.out$2.dec__V();
|
|
80782
|
+
this.out$2.dec__V()
|
|
80783
|
+
});
|
|
80602
80784
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
80603
80785
|
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)));
|
|
80604
80786
|
this.out$2.puts__T__V((("`" + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(attrName)) + "`: bool"))
|
|
@@ -80606,11 +80788,11 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_ka
|
|
|
80606
80788
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchEnd__V = (function() {
|
|
80607
80789
|
/*<skip>*/
|
|
80608
80790
|
});
|
|
80609
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.
|
|
80791
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
80610
80792
|
this.out$2.puts__T__V("block:");
|
|
80611
80793
|
this.out$2.inc__V();
|
|
80612
80794
|
this.out$2.puts__T__V("var i: int");
|
|
80613
|
-
this.out$2.puts__T__V("while
|
|
80795
|
+
this.out$2.puts__T__V((("while not " + io) + ".isEof:"));
|
|
80614
80796
|
this.out$2.inc__V()
|
|
80615
80797
|
});
|
|
80616
80798
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfElseStart__V = (function() {
|
|
@@ -80620,6 +80802,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfElseStart__V = (fun
|
|
|
80620
80802
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
80621
80803
|
this.outHeader$2 = x$1
|
|
80622
80804
|
});
|
|
80805
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
80806
|
+
/*<skip>*/
|
|
80807
|
+
});
|
|
80623
80808
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceForwardDeclaration__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(className, instName, dataType) {
|
|
80624
80809
|
var jsx$1 = this.out$2;
|
|
80625
80810
|
var x = this.idToStr__Lio_kaitai_struct_format_Identifier__T(instName);
|
|
@@ -80683,13 +80868,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceHeader__sci_List__L
|
|
|
80683
80868
|
jsx$1.puts__T__V((((((("proc " + $f_sc_IndexedSeqOptimized__dropRight__I__O(this$2, 4)) + "(this: ") + this.namespaced__sci_List__T(className)) + "): ") + $m_Lio_kaitai_struct_languages_NimCompiler$().ksToNim__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " = "));
|
|
80684
80869
|
this.out$2.inc__V()
|
|
80685
80870
|
});
|
|
80686
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
80687
|
-
this.out$2.puts__T__V("block:");
|
|
80688
|
-
this.out$2.inc__V();
|
|
80689
|
-
this.out$2.puts__T__V("var i: int");
|
|
80690
|
-
this.out$2.puts__T__V((("while not " + io) + ".isEof:"));
|
|
80691
|
-
this.out$2.inc__V()
|
|
80692
|
-
});
|
|
80693
80871
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
|
|
80694
80872
|
this.out$2.puts__T__V("block:");
|
|
80695
80873
|
this.out$2.inc__V();
|
|
@@ -80971,6 +81149,10 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classForwardDeclaration__sc
|
|
|
80971
81149
|
var paramsArg = jsx$3.join__sc_TraversableOnce__T__T__T__T($as_sc_TraversableOnce(jsx$2), ", ", ", ", "");
|
|
80972
81150
|
this.out$2.puts__T__V((((((("proc read*(_: typedesc[" + t) + "], io: KaitaiStream, root: KaitaiStruct, parent: ") + p) + paramsArg) + "): ") + t))
|
|
80973
81151
|
});
|
|
81152
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
81153
|
+
this.out$2.puts__T__V((("for i in 0 ..< int(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
|
|
81154
|
+
this.out$2.inc__V()
|
|
81155
|
+
});
|
|
80974
81156
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
80975
81157
|
this.out$2.puts__T__V((("alignToByte(" + io) + ")"))
|
|
80976
81158
|
});
|
|
@@ -81179,6 +81361,13 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchCaseStart__Lio_kaitai
|
|
|
81179
81361
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.classConstructorFooter__V = (function() {
|
|
81180
81362
|
this.out$2.dec__V()
|
|
81181
81363
|
});
|
|
81364
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
81365
|
+
this.out$2.puts__T__V("block:");
|
|
81366
|
+
this.out$2.inc__V();
|
|
81367
|
+
this.out$2.puts__T__V("var i: int");
|
|
81368
|
+
this.out$2.puts__T__V("while true:");
|
|
81369
|
+
this.out$2.inc__V()
|
|
81370
|
+
});
|
|
81182
81371
|
$c_Lio_kaitai_struct_languages_NimCompiler.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) {
|
|
81183
81372
|
$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)
|
|
81184
81373
|
});
|
|
@@ -81206,10 +81395,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.outFileName__T__T = (functi
|
|
|
81206
81395
|
$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) {
|
|
81207
81396
|
this.importList$2 = x$1
|
|
81208
81397
|
});
|
|
81209
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
81210
|
-
this.out$2.puts__T__V((("for i in 0 ..< int(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
|
|
81211
|
-
this.out$2.inc__V()
|
|
81212
|
-
});
|
|
81213
81398
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.readFooter__V = (function() {
|
|
81214
81399
|
this.out$2.dec__V();
|
|
81215
81400
|
var this$1 = this.out$2;
|
|
@@ -81427,16 +81612,6 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.translator__Lio_kaitai_stru
|
|
|
81427
81612
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.translator__Lio_kaitai_struct_translators_AbstractTranslator = (function() {
|
|
81428
81613
|
return this.translator$2
|
|
81429
81614
|
});
|
|
81430
|
-
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
81431
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
81432
|
-
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ":"));
|
|
81433
|
-
this.out$2.inc__V();
|
|
81434
|
-
this.out$2.puts__T__V("break");
|
|
81435
|
-
this.out$2.dec__V();
|
|
81436
|
-
this.out$2.puts__T__V("inc i");
|
|
81437
|
-
this.out$2.dec__V();
|
|
81438
|
-
this.out$2.dec__V()
|
|
81439
|
-
});
|
|
81440
81615
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.outHeader__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
81441
81616
|
return this.outHeader$2
|
|
81442
81617
|
});
|
|
@@ -81516,6 +81691,12 @@ function $h_Lio_kaitai_struct_languages_RubyCompiler() {
|
|
|
81516
81691
|
/*<skip>*/
|
|
81517
81692
|
}
|
|
81518
81693
|
$h_Lio_kaitai_struct_languages_RubyCompiler.prototype = $c_Lio_kaitai_struct_languages_RubyCompiler.prototype;
|
|
81694
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
81695
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
81696
|
+
this.out$2.puts__T__V("i += 1");
|
|
81697
|
+
this.out$2.dec__V();
|
|
81698
|
+
this.out$2.puts__T__V(("end until " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)))
|
|
81699
|
+
});
|
|
81519
81700
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchEnd__V = (function() {
|
|
81520
81701
|
this.out$2.puts__T__V("end")
|
|
81521
81702
|
});
|
|
@@ -81523,7 +81704,8 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.debugClassSequence__sci_Li
|
|
|
81523
81704
|
var f = (function($this) {
|
|
81524
81705
|
return (function(attr$2) {
|
|
81525
81706
|
var attr = $as_Lio_kaitai_struct_format_AttrSpec(attr$2);
|
|
81526
|
-
|
|
81707
|
+
var id = attr.id$1;
|
|
81708
|
+
return (("\"" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "\"")
|
|
81527
81709
|
})
|
|
81528
81710
|
})(this);
|
|
81529
81711
|
var this$1 = $m_sci_List$();
|
|
@@ -81573,16 +81755,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceHeader__T__Lio_kai
|
|
|
81573
81755
|
this.out$2.puts__T__V(("def " + instName.name$2));
|
|
81574
81756
|
this.out$2.inc__V()
|
|
81575
81757
|
});
|
|
81576
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.
|
|
81577
|
-
if ((needRaw.level__I() >= 1)) {
|
|
81578
|
-
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)) + " = []"))
|
|
81579
|
-
};
|
|
81580
|
-
if ((needRaw.level__I() >= 2)) {
|
|
81581
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
|
|
81582
|
-
};
|
|
81583
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
|
|
81758
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
81584
81759
|
this.out$2.puts__T__V("i = 0");
|
|
81585
|
-
this.out$2.puts__T__V("
|
|
81760
|
+
this.out$2.puts__T__V((("while not " + io) + ".eof?"));
|
|
81586
81761
|
this.out$2.inc__V()
|
|
81587
81762
|
});
|
|
81588
81763
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.types2class__sci_List__T = (function(names) {
|
|
@@ -81628,6 +81803,15 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.types2class__sci_List__T =
|
|
|
81628
81803
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
81629
81804
|
this.outHeader$2 = x$1
|
|
81630
81805
|
});
|
|
81806
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
81807
|
+
if ((needRaw.level__I() >= 1)) {
|
|
81808
|
+
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)) + " = []"))
|
|
81809
|
+
};
|
|
81810
|
+
if ((needRaw.level__I() >= 2)) {
|
|
81811
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
|
|
81812
|
+
};
|
|
81813
|
+
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"))
|
|
81814
|
+
});
|
|
81631
81815
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classHeader__T__V = (function(name) {
|
|
81632
81816
|
this.out$2.puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " < Kaitai::Struct::Struct"));
|
|
81633
81817
|
this.out$2.inc__V();
|
|
@@ -81649,20 +81833,8 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrParseHybrid__F0__F0__V
|
|
|
81649
81833
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
81650
81834
|
this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
|
|
81651
81835
|
});
|
|
81652
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
81653
|
-
if ((needRaw.level__I() >= 1)) {
|
|
81654
|
-
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)) + " = []"))
|
|
81655
|
-
};
|
|
81656
|
-
if ((needRaw.level__I() >= 2)) {
|
|
81657
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
|
|
81658
|
-
};
|
|
81659
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
|
|
81660
|
-
this.out$2.puts__T__V("i = 0");
|
|
81661
|
-
this.out$2.puts__T__V((("while not " + io) + ".eof?"));
|
|
81662
|
-
this.out$2.inc__V()
|
|
81663
|
-
});
|
|
81664
81836
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
81665
|
-
return ("@" +
|
|
81837
|
+
return ("@" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
81666
81838
|
});
|
|
81667
81839
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.seek__T__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(io, pos) {
|
|
81668
81840
|
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)) + ")"))
|
|
@@ -81829,7 +82001,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrDebugStart__Lio_kaitai
|
|
|
81829
82001
|
if (((attrId instanceof $c_Lio_kaitai_struct_format_RawIdentifier) || (attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier))) {
|
|
81830
82002
|
throw new $c_sr_NonLocalReturnControl$mcV$sp().init___O__sr_BoxedUnit(nonLocalReturnKey1, (void 0))
|
|
81831
82003
|
};
|
|
81832
|
-
var name =
|
|
82004
|
+
var name = $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId);
|
|
81833
82005
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
81834
82006
|
if ((x === rep)) {
|
|
81835
82007
|
this.out$2.puts__T__V((((("(@_debug['" + name) + "'] ||= {})[:start] = ") + io) + ".pos"))
|
|
@@ -81915,37 +82087,15 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrParse2$default$7__s_Op
|
|
|
81915
82087
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
81916
82088
|
this.out$2.puts__T__V(((id + " = ") + expr))
|
|
81917
82089
|
});
|
|
81918
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.
|
|
81919
|
-
|
|
81920
|
-
|
|
81921
|
-
var name = x2.name$2;
|
|
81922
|
-
$m_Lio_kaitai_struct_Utils$();
|
|
81923
|
-
return name
|
|
81924
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
81925
|
-
var x3 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
81926
|
-
var idx = x3.idx$2;
|
|
81927
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
81928
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
81929
|
-
var x6 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
81930
|
-
return x6.name$2
|
|
81931
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
81932
|
-
var x4 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
81933
|
-
var inner = x4.innerId$2;
|
|
81934
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(inner))
|
|
81935
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
81936
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
81937
|
-
var name$2 = x5.name$2;
|
|
81938
|
-
$m_Lio_kaitai_struct_Utils$();
|
|
81939
|
-
return name$2
|
|
81940
|
-
} else {
|
|
81941
|
-
throw new $c_s_MatchError().init___O(id)
|
|
81942
|
-
}
|
|
82090
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
82091
|
+
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|"));
|
|
82092
|
+
this.out$2.inc__V()
|
|
81943
82093
|
});
|
|
81944
82094
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
81945
82095
|
this.out$2.puts__T__V((io + ".align_to_byte"))
|
|
81946
82096
|
});
|
|
81947
82097
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
81948
|
-
return ("_t_" +
|
|
82098
|
+
return ("_t_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
81949
82099
|
});
|
|
81950
82100
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.out__Lio_kaitai_struct_StringLanguageOutputWriter = (function() {
|
|
81951
82101
|
return this.out$2
|
|
@@ -81978,7 +82128,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatEos_
|
|
|
81978
82128
|
this.out$2.puts__T__V(((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " << ") + expr))
|
|
81979
82129
|
});
|
|
81980
82130
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
81981
|
-
this.
|
|
82131
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
81982
82132
|
});
|
|
81983
82133
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.readHeader__s_Option__Z__V = (function(endian, isEmpty) {
|
|
81984
82134
|
if ((endian instanceof $c_s_Some)) {
|
|
@@ -82010,6 +82160,11 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchCaseStart__Lio_kaita
|
|
|
82010
82160
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorFooter__V = (function() {
|
|
82011
82161
|
this.universalFooter__V()
|
|
82012
82162
|
});
|
|
82163
|
+
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
82164
|
+
this.out$2.puts__T__V("i = 0");
|
|
82165
|
+
this.out$2.puts__T__V("begin");
|
|
82166
|
+
this.out$2.inc__V()
|
|
82167
|
+
});
|
|
82013
82168
|
$c_Lio_kaitai_struct_languages_RubyCompiler.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) {
|
|
82014
82169
|
$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)
|
|
82015
82170
|
});
|
|
@@ -82056,17 +82211,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.readFooter__V = (function(
|
|
|
82056
82211
|
this.out$2.puts__T__V("self");
|
|
82057
82212
|
this.universalFooter__V()
|
|
82058
82213
|
});
|
|
82059
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
82060
|
-
if ((needRaw.level__I() >= 1)) {
|
|
82061
|
-
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)) + " = Array.new(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
|
|
82062
|
-
};
|
|
82063
|
-
if ((needRaw.level__I() >= 2)) {
|
|
82064
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = Array.new(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
|
|
82065
|
-
};
|
|
82066
|
-
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = Array.new(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"));
|
|
82067
|
-
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|"));
|
|
82068
|
-
this.out$2.inc__V()
|
|
82069
|
-
});
|
|
82070
82214
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
82071
82215
|
this.out$2.puts__T__V(("case " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)))
|
|
82072
82216
|
});
|
|
@@ -82121,7 +82265,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attrDebugEnd__Lio_kaitai_s
|
|
|
82121
82265
|
if (((attrId instanceof $c_Lio_kaitai_struct_format_RawIdentifier) || (attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier))) {
|
|
82122
82266
|
return (void 0)
|
|
82123
82267
|
};
|
|
82124
|
-
var name =
|
|
82268
|
+
var name = $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId);
|
|
82125
82269
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
82126
82270
|
if ((x === rep)) {
|
|
82127
82271
|
this.out$2.puts__T__V((((("(@_debug['" + name) + "'] ||= {})[:end] = ") + io) + ".pos"))
|
|
@@ -82308,7 +82452,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorHeader__T_
|
|
|
82308
82452
|
return (function(p$2) {
|
|
82309
82453
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
82310
82454
|
var id = p.id$1;
|
|
82311
|
-
return $
|
|
82455
|
+
return $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
82312
82456
|
})
|
|
82313
82457
|
})(this);
|
|
82314
82458
|
var this$1 = $m_sci_List$();
|
|
@@ -82355,7 +82499,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorHeader__T_
|
|
|
82355
82499
|
var p$3 = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$3);
|
|
82356
82500
|
var jsx$3 = p$3.id$1;
|
|
82357
82501
|
var id$1 = p$3.id$1;
|
|
82358
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$3,
|
|
82502
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$3, $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1));
|
|
82359
82503
|
var this$4 = these$1;
|
|
82360
82504
|
these$1 = this$4.tail__sci_List()
|
|
82361
82505
|
};
|
|
@@ -82363,12 +82507,6 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.classConstructorHeader__T_
|
|
|
82363
82507
|
this.out$2.puts__T__V("@_debug = {}")
|
|
82364
82508
|
}
|
|
82365
82509
|
});
|
|
82366
|
-
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
82367
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
82368
|
-
this.out$2.puts__T__V("i += 1");
|
|
82369
|
-
this.out$2.dec__V();
|
|
82370
|
-
this.out$2.puts__T__V(("end until " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)))
|
|
82371
|
-
});
|
|
82372
82510
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.universalFooter__V = (function() {
|
|
82373
82511
|
this.out$2.dec__V();
|
|
82374
82512
|
this.out$2.puts__T__V("end")
|
|
@@ -82381,7 +82519,7 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.instanceCalculate__Lio_kai
|
|
|
82381
82519
|
});
|
|
82382
82520
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(id, rep) {
|
|
82383
82521
|
this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
82384
|
-
var ioName = ("_io_" +
|
|
82522
|
+
var ioName = ("_io_" + $m_Lio_kaitai_struct_languages_RubyCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id));
|
|
82385
82523
|
var args = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(id, rep);
|
|
82386
82524
|
this.out$2.puts__T__V((((ioName + " = Kaitai::Struct::Stream.new(") + args) + ")"));
|
|
82387
82525
|
return ioName
|
|
@@ -82411,7 +82549,9 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.attributeReader__Lio_kaita
|
|
|
82411
82549
|
var jsx$1 = x$3.equals__O__Z(attrName)
|
|
82412
82550
|
};
|
|
82413
82551
|
if ((!jsx$1)) {
|
|
82414
|
-
|
|
82552
|
+
var jsx$2 = this.out$2;
|
|
82553
|
+
var this$1 = $m_Lio_kaitai_struct_languages_RubyCompiler$();
|
|
82554
|
+
jsx$2.puts__T__V(("attr_reader :" + this$1.idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)))
|
|
82415
82555
|
}
|
|
82416
82556
|
});
|
|
82417
82557
|
$c_Lio_kaitai_struct_languages_RubyCompiler.prototype.enumValue__T__T__T = (function(enumName, enumLabel) {
|
|
@@ -82613,8 +82753,16 @@ function $h_Lio_kaitai_struct_languages_JavaCompiler() {
|
|
|
82613
82753
|
/*<skip>*/
|
|
82614
82754
|
}
|
|
82615
82755
|
$h_Lio_kaitai_struct_languages_JavaCompiler.prototype = $c_Lio_kaitai_struct_languages_JavaCompiler.prototype;
|
|
82756
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
82757
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
82758
|
+
this.out$2.puts__T__V("i++;");
|
|
82759
|
+
this.out$2.dec__V();
|
|
82760
|
+
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
|
|
82761
|
+
this.out$2.dec__V();
|
|
82762
|
+
this.out$2.puts__T__V("}")
|
|
82763
|
+
});
|
|
82616
82764
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
82617
|
-
this.out$2.puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(attrType)) + " ") +
|
|
82765
|
+
this.out$2.puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(attrType)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
82618
82766
|
});
|
|
82619
82767
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchEnd__V = (function() {
|
|
82620
82768
|
this.out$2.puts__T__V("}")
|
|
@@ -82623,7 +82771,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.debugClassSequence__sci_Li
|
|
|
82623
82771
|
var f = (function($this) {
|
|
82624
82772
|
return (function(attr$2) {
|
|
82625
82773
|
var attr = $as_Lio_kaitai_struct_format_AttrSpec(attr$2);
|
|
82626
|
-
|
|
82774
|
+
var id = attr.id$1;
|
|
82775
|
+
return (("\"" + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "\"")
|
|
82627
82776
|
})
|
|
82628
82777
|
})(this);
|
|
82629
82778
|
var this$1 = $m_sci_List$();
|
|
@@ -82661,31 +82810,17 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.debugClassSequence__sci_Li
|
|
|
82661
82810
|
this.out$2.puts__T__V((("public static String[] _seqFields = new String[] { " + seqStr) + " };"))
|
|
82662
82811
|
});
|
|
82663
82812
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
82664
|
-
this.out$2.puts__T__V((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " ") +
|
|
82813
|
+
this.out$2.puts__T__V((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaTypeBoxed__Lio_kaitai_struct_datatype_DataType__T(dataType)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "() {"));
|
|
82665
82814
|
this.out$2.inc__V()
|
|
82666
82815
|
});
|
|
82667
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.
|
|
82668
|
-
if ((needRaw.level__I() >= 1)) {
|
|
82669
|
-
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)) + " = new ArrayList<byte[]>();"))
|
|
82670
|
-
};
|
|
82671
|
-
if ((needRaw.level__I() >= 2)) {
|
|
82672
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>();"))
|
|
82673
|
-
};
|
|
82674
|
-
var jsx$2 = this.out$2;
|
|
82675
|
-
var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
82676
|
-
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
82677
|
-
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
|
|
82678
|
-
jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"));
|
|
82816
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
82679
82817
|
this.out$2.puts__T__V("{");
|
|
82680
82818
|
this.out$2.inc__V();
|
|
82681
|
-
var jsx$3 = this.out$2;
|
|
82682
|
-
var this$2 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
82683
|
-
jsx$3.puts__T__V((((this$2.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
|
|
82684
82819
|
this.out$2.puts__T__V("int i = 0;");
|
|
82685
|
-
this.out$2.puts__T__V("
|
|
82820
|
+
this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
|
|
82686
82821
|
this.out$2.inc__V();
|
|
82687
|
-
var this$
|
|
82688
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$
|
|
82822
|
+
var this$1 = this.importList$2;
|
|
82823
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "java.util.ArrayList")
|
|
82689
82824
|
});
|
|
82690
82825
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfElseStart__V = (function() {
|
|
82691
82826
|
this.out$2.puts__T__V("else {");
|
|
@@ -82694,6 +82829,19 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfElseStart__V = (fu
|
|
|
82694
82829
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
82695
82830
|
this.outHeader$2 = x$1
|
|
82696
82831
|
});
|
|
82832
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
82833
|
+
if ((needRaw.level__I() >= 1)) {
|
|
82834
|
+
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)) + " = new ArrayList<byte[]>();"))
|
|
82835
|
+
};
|
|
82836
|
+
if ((needRaw.level__I() >= 2)) {
|
|
82837
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>();"))
|
|
82838
|
+
};
|
|
82839
|
+
var jsx$2 = this.out$2;
|
|
82840
|
+
var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
82841
|
+
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
82842
|
+
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
|
|
82843
|
+
jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"))
|
|
82844
|
+
});
|
|
82697
82845
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classHeader__T__V = (function(name) {
|
|
82698
82846
|
var staticStr = ((this.out$2.indentLevel$1 > 0) ? "static " : "");
|
|
82699
82847
|
this.out$2.puts__T__V((((("public " + staticStr) + "class ") + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + " extends KaitaiStruct {"));
|
|
@@ -82760,28 +82908,8 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesUsingIf__Lio_ka
|
|
|
82760
82908
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
82761
82909
|
this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
|
|
82762
82910
|
});
|
|
82763
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
82764
|
-
if ((needRaw.level__I() >= 1)) {
|
|
82765
|
-
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)) + " = new ArrayList<byte[]>();"))
|
|
82766
|
-
};
|
|
82767
|
-
if ((needRaw.level__I() >= 2)) {
|
|
82768
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>();"))
|
|
82769
|
-
};
|
|
82770
|
-
var jsx$2 = this.out$2;
|
|
82771
|
-
var jsx$1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
82772
|
-
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
82773
|
-
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
|
|
82774
|
-
jsx$2.puts__T__V((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "();"));
|
|
82775
|
-
this.out$2.puts__T__V("{");
|
|
82776
|
-
this.out$2.inc__V();
|
|
82777
|
-
this.out$2.puts__T__V("int i = 0;");
|
|
82778
|
-
this.out$2.puts__T__V((("while (!" + io) + ".isEof()) {"));
|
|
82779
|
-
this.out$2.inc__V();
|
|
82780
|
-
var this$2 = this.importList$2;
|
|
82781
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
|
|
82782
|
-
});
|
|
82783
82911
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
82784
|
-
return ("this." +
|
|
82912
|
+
return ("this." + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
82785
82913
|
});
|
|
82786
82914
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
|
|
82787
82915
|
this.out$2.puts__T__V("{");
|
|
@@ -82998,7 +83126,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrDebugStart__Lio_kaitai
|
|
|
82998
83126
|
if (((attrId instanceof $c_Lio_kaitai_struct_format_RawIdentifier) || (attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier))) {
|
|
82999
83127
|
throw new $c_sr_NonLocalReturnControl$mcV$sp().init___O__sr_BoxedUnit(nonLocalReturnKey1, (void 0))
|
|
83000
83128
|
};
|
|
83001
|
-
var name =
|
|
83129
|
+
var name = $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId);
|
|
83002
83130
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
83003
83131
|
if ((x === rep)) {
|
|
83004
83132
|
this.out$2.puts__T__V((((("_attrStart.put(\"" + name) + "\", ") + io) + ".pos());"))
|
|
@@ -83105,33 +83233,14 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentTempVar__L
|
|
|
83105
83233
|
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
83106
83234
|
jsx$1.puts__T__V((((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + id) + " = ") + expr) + ";"))
|
|
83107
83235
|
});
|
|
83108
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.
|
|
83109
|
-
|
|
83110
|
-
|
|
83111
|
-
|
|
83112
|
-
|
|
83113
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
83114
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
83115
|
-
var name$2 = x3.name$2;
|
|
83116
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$2)
|
|
83117
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
83118
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
83119
|
-
var idx = x4.idx$2;
|
|
83120
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
83121
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
83122
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
83123
|
-
var name$3 = x5.name$2;
|
|
83124
|
-
return $m_Lio_kaitai_struct_Utils$().lowerCamelCase__T__T(name$3)
|
|
83125
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
83126
|
-
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
83127
|
-
var innerId = x6.innerId$2;
|
|
83128
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
83129
|
-
} else {
|
|
83130
|
-
throw new $c_s_MatchError().init___O(id)
|
|
83131
|
-
}
|
|
83236
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
83237
|
+
this.out$2.puts__T__V((("for (int i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
|
|
83238
|
+
this.out$2.inc__V();
|
|
83239
|
+
var this$1 = this.importList$2;
|
|
83240
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.list$1, "java.util.ArrayList")
|
|
83132
83241
|
});
|
|
83133
83242
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
83134
|
-
return ("_t_" +
|
|
83243
|
+
return ("_t_" + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
83135
83244
|
});
|
|
83136
83245
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
83137
83246
|
this.out$2.puts__T__V((io + ".alignToByte();"))
|
|
@@ -83166,7 +83275,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.type2class__T__T = (functi
|
|
|
83166
83275
|
return $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)
|
|
83167
83276
|
});
|
|
83168
83277
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
83169
|
-
this.out$2.puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") +
|
|
83278
|
+
this.out$2.puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
83170
83279
|
});
|
|
83171
83280
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.extraAttrForIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__sci_List = (function(id, rep) {
|
|
83172
83281
|
return $m_sci_Nil$()
|
|
@@ -83179,7 +83288,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatEos_
|
|
|
83179
83288
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".add(") + expr) + ");"))
|
|
83180
83289
|
});
|
|
83181
83290
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
83182
|
-
this.
|
|
83291
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
83183
83292
|
});
|
|
83184
83293
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
83185
83294
|
this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
|
|
@@ -83220,6 +83329,18 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCaseStart__Lio_kaita
|
|
|
83220
83329
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorFooter__V = (function() {
|
|
83221
83330
|
this.universalFooter__V()
|
|
83222
83331
|
});
|
|
83332
|
+
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
83333
|
+
this.out$2.puts__T__V("{");
|
|
83334
|
+
this.out$2.inc__V();
|
|
83335
|
+
var jsx$1 = this.out$2;
|
|
83336
|
+
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
83337
|
+
jsx$1.puts__T__V((((this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(dataType) + " ") + this.translator$2.doName__T__T("_")) + ";"));
|
|
83338
|
+
this.out$2.puts__T__V("int i = 0;");
|
|
83339
|
+
this.out$2.puts__T__V("do {");
|
|
83340
|
+
this.out$2.inc__V();
|
|
83341
|
+
var this$2 = this.importList$2;
|
|
83342
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
|
|
83343
|
+
});
|
|
83223
83344
|
$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) {
|
|
83224
83345
|
$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)
|
|
83225
83346
|
});
|
|
@@ -83227,7 +83348,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.popPos__T__V = (function(i
|
|
|
83227
83348
|
this.out$2.puts__T__V((io + ".seek(_pos);"))
|
|
83228
83349
|
});
|
|
83229
83350
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
83230
|
-
var memberName =
|
|
83351
|
+
var memberName = $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
83231
83352
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
83232
83353
|
if ((x === rep)) {
|
|
83233
83354
|
return memberName
|
|
@@ -83264,23 +83385,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.io$kaitai$struct$languages
|
|
|
83264
83385
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.readFooter__V = (function() {
|
|
83265
83386
|
this.universalFooter__V()
|
|
83266
83387
|
});
|
|
83267
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
83268
|
-
if ((needRaw.level__I() >= 1)) {
|
|
83269
|
-
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)) + " = new ArrayList<byte[]>(((Number) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")).intValue());"))
|
|
83270
|
-
};
|
|
83271
|
-
if ((needRaw.level__I() >= 2)) {
|
|
83272
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = new ArrayList<byte[]>(((Number) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")).intValue());"))
|
|
83273
|
-
};
|
|
83274
|
-
var jsx$2 = this.out$2;
|
|
83275
|
-
var jsx$1 = this.idToStr__Lio_kaitai_struct_format_Identifier__T(id);
|
|
83276
|
-
var this$1 = $m_Lio_kaitai_struct_languages_JavaCompiler$();
|
|
83277
|
-
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream().init___Lio_kaitai_struct_datatype_DataType(dataType);
|
|
83278
|
-
jsx$2.puts__T__V((((((jsx$1 + " = new ") + this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType)) + "(((Number) (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")).intValue());"));
|
|
83279
|
-
this.out$2.puts__T__V((("for (int i = 0; i < " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "; i++) {"));
|
|
83280
|
-
this.out$2.inc__V();
|
|
83281
|
-
var this$2 = this.importList$2;
|
|
83282
|
-
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$2.list$1, "java.util.ArrayList")
|
|
83283
|
-
});
|
|
83284
83388
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
83285
83389
|
this.out$2.puts__T__V((("switch (" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ") {"))
|
|
83286
83390
|
});
|
|
@@ -83352,7 +83456,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrDebugEnd__Lio_kaitai_s
|
|
|
83352
83456
|
if (((attrId instanceof $c_Lio_kaitai_struct_format_RawIdentifier) || (attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier))) {
|
|
83353
83457
|
return (void 0)
|
|
83354
83458
|
};
|
|
83355
|
-
var name =
|
|
83459
|
+
var name = $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId);
|
|
83356
83460
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
83357
83461
|
if ((x === rep)) {
|
|
83358
83462
|
this.out$2.puts__T__V((((("_attrEnd.put(\"" + name) + "\", ") + io) + ".pos());"))
|
|
@@ -83534,7 +83638,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attrProcess__Lio_kaitai_st
|
|
|
83534
83638
|
};
|
|
83535
83639
|
var name$1 = $as_T($f_sc_LinearSeqOptimized__last__O(name));
|
|
83536
83640
|
var procClass = ((namespace + jsx$1) + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name$1));
|
|
83537
|
-
var procName = ("_process_" +
|
|
83641
|
+
var procName = ("_process_" + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varSrc));
|
|
83538
83642
|
var jsx$3 = this.out$2;
|
|
83539
83643
|
var jsx$2 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
|
|
83540
83644
|
return (function(e$2) {
|
|
@@ -83592,7 +83696,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
83592
83696
|
var attrType = p.dataType$1;
|
|
83593
83697
|
var jsx$2 = this$1.kaitaiType2JavaTypePrim__Lio_kaitai_struct_datatype_DataType__T(attrType);
|
|
83594
83698
|
var id = p.id$1;
|
|
83595
|
-
return ((jsx$2 + " ") + $
|
|
83699
|
+
return ((jsx$2 + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
83596
83700
|
})
|
|
83597
83701
|
})(this);
|
|
83598
83702
|
var this$2 = $m_sci_List$();
|
|
@@ -83645,7 +83749,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
83645
83749
|
return (function(p$3$2) {
|
|
83646
83750
|
var p$3 = $as_Lio_kaitai_struct_format_ParamDefSpec(p$3$2);
|
|
83647
83751
|
var id$1 = p$3.id$1;
|
|
83648
|
-
return
|
|
83752
|
+
return $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1)
|
|
83649
83753
|
})
|
|
83650
83754
|
})(this);
|
|
83651
83755
|
var this$7 = $m_sci_List$();
|
|
@@ -83718,7 +83822,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.classConstructorHeader__T_
|
|
|
83718
83822
|
var p$4 = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$6);
|
|
83719
83823
|
var jsx$13 = p$4.id$1;
|
|
83720
83824
|
var id$2 = p$4.id$1;
|
|
83721
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$13,
|
|
83825
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$13, $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$2));
|
|
83722
83826
|
var this$15 = these$2;
|
|
83723
83827
|
these$2 = this$15.tail__sci_List()
|
|
83724
83828
|
}
|
|
@@ -83761,14 +83865,6 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.switchCasesRender__Lio_kai
|
|
|
83761
83865
|
$f_Lio_kaitai_struct_languages_components_SwitchOps__switchCasesRender__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__sci_Map__F1__F1__V(this, id, on, cases, normalCaseProc, elseCaseProc)
|
|
83762
83866
|
}
|
|
83763
83867
|
});
|
|
83764
|
-
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
83765
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
83766
|
-
this.out$2.puts__T__V("i++;");
|
|
83767
|
-
this.out$2.dec__V();
|
|
83768
|
-
this.out$2.puts__T__V((("} while (!(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + "));"));
|
|
83769
|
-
this.out$2.dec__V();
|
|
83770
|
-
this.out$2.puts__T__V("}")
|
|
83771
|
-
});
|
|
83772
83868
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.universalFooter__V = (function() {
|
|
83773
83869
|
this.out$2.dec__V();
|
|
83774
83870
|
this.out$2.puts__T__V("}")
|
|
@@ -83787,7 +83883,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.outHeader__Lio_kaitai_stru
|
|
|
83787
83883
|
return this.outHeader$2
|
|
83788
83884
|
});
|
|
83789
83885
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
83790
|
-
var javaName =
|
|
83886
|
+
var javaName = $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
83791
83887
|
var ioName = ("_io_" + javaName);
|
|
83792
83888
|
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));
|
|
83793
83889
|
var this$1 = this.importList$2;
|
|
@@ -83816,7 +83912,7 @@ $c_Lio_kaitai_struct_languages_JavaCompiler.prototype.fileHeader__T__V = (functi
|
|
|
83816
83912
|
this$6.sb$2.append__T__scm_StringBuilder("\n")
|
|
83817
83913
|
});
|
|
83818
83914
|
$c_Lio_kaitai_struct_languages_JavaCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
83819
|
-
this.out$2.puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") +
|
|
83915
|
+
this.out$2.puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_JavaCompiler$().kaitaiType2JavaType__Lio_kaitai_struct_datatype_DataType__Z__T(attrType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "() { return ") + $m_Lio_kaitai_struct_languages_JavaCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; }"))
|
|
83820
83916
|
});
|
|
83821
83917
|
var $d_Lio_kaitai_struct_languages_JavaCompiler = new $TypeData().initClass({
|
|
83822
83918
|
Lio_kaitai_struct_languages_JavaCompiler: 0
|
|
@@ -83856,6 +83952,15 @@ function $h_Lio_kaitai_struct_languages_PythonCompiler() {
|
|
|
83856
83952
|
/*<skip>*/
|
|
83857
83953
|
}
|
|
83858
83954
|
$h_Lio_kaitai_struct_languages_PythonCompiler.prototype = $c_Lio_kaitai_struct_languages_PythonCompiler.prototype;
|
|
83955
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
83956
|
+
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
83957
|
+
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
|
|
83958
|
+
this.out$2.inc__V();
|
|
83959
|
+
this.out$2.puts__T__V("break");
|
|
83960
|
+
this.out$2.dec__V();
|
|
83961
|
+
this.out$2.puts__T__V("i += 1");
|
|
83962
|
+
this.out$2.dec__V()
|
|
83963
|
+
});
|
|
83859
83964
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchEnd__V = (function() {
|
|
83860
83965
|
/*<skip>*/
|
|
83861
83966
|
});
|
|
@@ -83863,7 +83968,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.debugClassSequence__sci_
|
|
|
83863
83968
|
var f = (function($this) {
|
|
83864
83969
|
return (function(attr$2) {
|
|
83865
83970
|
var attr = $as_Lio_kaitai_struct_format_AttrSpec(attr$2);
|
|
83866
|
-
|
|
83971
|
+
var id = attr.id$1;
|
|
83972
|
+
return (("\"" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)) + "\"")
|
|
83867
83973
|
})
|
|
83868
83974
|
})(this);
|
|
83869
83975
|
var this$1 = $m_sci_List$();
|
|
@@ -83910,19 +84016,12 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classToString__Lio_kaita
|
|
|
83910
84016
|
});
|
|
83911
84017
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
83912
84018
|
this.out$2.puts__T__V("@property");
|
|
83913
|
-
this.out$2.puts__T__V((("def " +
|
|
84019
|
+
this.out$2.puts__T__V((("def " + $m_Lio_kaitai_struct_languages_PythonCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + "(self):"));
|
|
83914
84020
|
this.out$2.inc__V()
|
|
83915
84021
|
});
|
|
83916
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.
|
|
83917
|
-
if ((needRaw.level__I() >= 1)) {
|
|
83918
|
-
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)) + " = []"))
|
|
83919
|
-
};
|
|
83920
|
-
if ((needRaw.level__I() >= 2)) {
|
|
83921
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
|
|
83922
|
-
};
|
|
83923
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
|
|
84022
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
83924
84023
|
this.out$2.puts__T__V("i = 0");
|
|
83925
|
-
this.out$2.puts__T__V("while
|
|
84024
|
+
this.out$2.puts__T__V((("while not " + io) + ".is_eof():"));
|
|
83926
84025
|
this.out$2.inc__V()
|
|
83927
84026
|
});
|
|
83928
84027
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.io$kaitai$struct$languages$components$SingleOutputFile$$undsetter$und$outHeader$und$eq__Lio_kaitai_struct_StringLanguageOutputWriter__V = (function(x$1) {
|
|
@@ -83932,6 +84031,15 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfElseStart__V = (
|
|
|
83932
84031
|
this.out$2.puts__T__V("else:");
|
|
83933
84032
|
this.out$2.inc__V()
|
|
83934
84033
|
});
|
|
84034
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatCommonInit__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, dataType, needRaw) {
|
|
84035
|
+
if ((needRaw.level__I() >= 1)) {
|
|
84036
|
+
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)) + " = []"))
|
|
84037
|
+
};
|
|
84038
|
+
if ((needRaw.level__I() >= 2)) {
|
|
84039
|
+
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
|
|
84040
|
+
};
|
|
84041
|
+
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"))
|
|
84042
|
+
});
|
|
83935
84043
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__T__V = (function(name) {
|
|
83936
84044
|
this.out$2.puts__T__V((("class " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(KaitaiStruct):"));
|
|
83937
84045
|
this.out$2.inc__V()
|
|
@@ -83952,20 +84060,8 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchCasesUsingIf__Lio_
|
|
|
83952
84060
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceHeader__sci_List__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
83953
84061
|
this.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V($as_T($f_sc_LinearSeqOptimized__last__O(className)), instName, dataType, isNullable)
|
|
83954
84062
|
});
|
|
83955
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__V = (function(id, io, dataType, needRaw) {
|
|
83956
|
-
if ((needRaw.level__I() >= 1)) {
|
|
83957
|
-
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)) + " = []"))
|
|
83958
|
-
};
|
|
83959
|
-
if ((needRaw.level__I() >= 2)) {
|
|
83960
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = []"))
|
|
83961
|
-
};
|
|
83962
|
-
this.out$2.puts__T__V((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = []"));
|
|
83963
|
-
this.out$2.puts__T__V("i = 0");
|
|
83964
|
-
this.out$2.puts__T__V((("while not " + io) + ".is_eof():"));
|
|
83965
|
-
this.out$2.inc__V()
|
|
83966
|
-
});
|
|
83967
84063
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.privateMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
83968
|
-
return ("self." +
|
|
84064
|
+
return ("self." + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
83969
84065
|
});
|
|
83970
84066
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__V = (function(id, on, onType) {
|
|
83971
84067
|
this.out$2.puts__T__V(("_on = " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)))
|
|
@@ -83974,7 +84070,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.seek__T__Lio_kaitai_stru
|
|
|
83974
84070
|
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)) + ")"))
|
|
83975
84071
|
});
|
|
83976
84072
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
83977
|
-
this.out$2.puts__T__V(((
|
|
84073
|
+
this.out$2.puts__T__V((("return getattr(self, '" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "', None)"))
|
|
83978
84074
|
});
|
|
83979
84075
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bool2Py__Z__T = (function(b) {
|
|
83980
84076
|
return (b ? "True" : "False")
|
|
@@ -84144,7 +84240,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrDebugStart__Lio_kait
|
|
|
84144
84240
|
if (((attrId instanceof $c_Lio_kaitai_struct_format_RawIdentifier) || (attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier))) {
|
|
84145
84241
|
throw new $c_sr_NonLocalReturnControl$mcV$sp().init___O__sr_BoxedUnit(nonLocalReturnKey1, (void 0))
|
|
84146
84242
|
};
|
|
84147
|
-
var name =
|
|
84243
|
+
var name = $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId);
|
|
84148
84244
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
84149
84245
|
if ((x === rep)) {
|
|
84150
84246
|
this.out$2.puts__T__V((((("self._debug['" + name) + "']['start'] = ") + io) + ".pos()"))
|
|
@@ -84203,39 +84299,18 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrParse2$default$7__s_
|
|
|
84203
84299
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
84204
84300
|
this.out$2.puts__T__V(((id + " = ") + expr))
|
|
84205
84301
|
});
|
|
84206
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.idToStr__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
84207
|
-
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
84208
|
-
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
84209
|
-
var name = x2.name$2;
|
|
84210
|
-
return name
|
|
84211
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
84212
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
84213
|
-
var name$2 = x3.name$2;
|
|
84214
|
-
return name$2
|
|
84215
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NumberedIdentifier)) {
|
|
84216
|
-
var x4 = $as_Lio_kaitai_struct_format_NumberedIdentifier(id);
|
|
84217
|
-
var idx = x4.idx$2;
|
|
84218
|
-
return (("_" + $m_Lio_kaitai_struct_format_NumberedIdentifier$().TEMPLATE$1) + idx)
|
|
84219
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
84220
|
-
var x5 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
84221
|
-
var name$3 = x5.name$2;
|
|
84222
|
-
return ("_m_" + name$3)
|
|
84223
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
84224
|
-
var x6 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
84225
|
-
var innerId = x6.innerId$2;
|
|
84226
|
-
return ("_raw_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
84227
|
-
} else {
|
|
84228
|
-
throw new $c_s_MatchError().init___O(id)
|
|
84229
|
-
}
|
|
84230
|
-
});
|
|
84231
84302
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.userType2class__Lio_kaitai_struct_datatype_DataType$UserType__T = (function(t) {
|
|
84232
84303
|
var name = $as_Lio_kaitai_struct_format_ClassSpec(t.classSpec$3.get__O()).name$1;
|
|
84233
84304
|
var firstName = $as_T(name.head__O());
|
|
84234
84305
|
var prefix = ((t.isOpaque__Z() && (firstName !== this.translator$2.provider$2.nowClass$1.name$1.head__O())) ? (firstName + ".") : "");
|
|
84235
84306
|
return (prefix + $m_Lio_kaitai_struct_languages_PythonCompiler$().types2class__sci_List__T(name))
|
|
84236
84307
|
});
|
|
84308
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, repeatExpr) {
|
|
84309
|
+
this.out$2.puts__T__V((("for i in range(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
|
|
84310
|
+
this.out$2.inc__V()
|
|
84311
|
+
});
|
|
84237
84312
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.localTemporaryName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
84238
|
-
return ("_t_" +
|
|
84313
|
+
return ("_t_" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id))
|
|
84239
84314
|
});
|
|
84240
84315
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.alignToByte__T__V = (function(io) {
|
|
84241
84316
|
this.out$2.puts__T__V((io + ".align_to_byte()"))
|
|
@@ -84278,7 +84353,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatEo
|
|
|
84278
84353
|
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + ".append(") + expr) + ")"))
|
|
84279
84354
|
});
|
|
84280
84355
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.handleAssignmentRepeatExpr__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
84281
|
-
this.
|
|
84356
|
+
this.handleAssignmentRepeatEos__Lio_kaitai_struct_format_Identifier__T__V(id, expr)
|
|
84282
84357
|
});
|
|
84283
84358
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classHeader__sci_List__V = (function(name) {
|
|
84284
84359
|
this.classHeader__T__V($as_T($f_sc_LinearSeqOptimized__last__O(name)))
|
|
@@ -84310,6 +84385,11 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchCaseStart__Lio_kai
|
|
|
84310
84385
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorFooter__V = (function() {
|
|
84311
84386
|
this.universalFooter__V()
|
|
84312
84387
|
});
|
|
84388
|
+
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, untilExpr) {
|
|
84389
|
+
this.out$2.puts__T__V("i = 0");
|
|
84390
|
+
this.out$2.puts__T__V("while True:");
|
|
84391
|
+
this.out$2.inc__V()
|
|
84392
|
+
});
|
|
84313
84393
|
$c_Lio_kaitai_struct_languages_PythonCompiler.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) {
|
|
84314
84394
|
$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)
|
|
84315
84395
|
});
|
|
@@ -84352,17 +84432,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.io$kaitai$struct$languag
|
|
|
84352
84432
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.readFooter__V = (function() {
|
|
84353
84433
|
this.universalFooter__V()
|
|
84354
84434
|
});
|
|
84355
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatExprHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, repeatExpr) {
|
|
84356
|
-
if ((needRaw.level__I() >= 1)) {
|
|
84357
|
-
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)) + " = [None] * (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
|
|
84358
|
-
};
|
|
84359
|
-
if ((needRaw.level__I() >= 2)) {
|
|
84360
|
-
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(new $c_Lio_kaitai_struct_format_RawIdentifier().init___Lio_kaitai_struct_format_Identifier(id))) + " = [None] * (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"))
|
|
84361
|
-
};
|
|
84362
|
-
this.out$2.puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = [None] * (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + ")"));
|
|
84363
|
-
this.out$2.puts__T__V((("for i in range(" + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, repeatExpr)) + "):"));
|
|
84364
|
-
this.out$2.inc__V()
|
|
84365
|
-
});
|
|
84366
84435
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchStart__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, on) {
|
|
84367
84436
|
/*<skip>*/
|
|
84368
84437
|
});
|
|
@@ -84484,7 +84553,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrDebugEnd__Lio_kaitai
|
|
|
84484
84553
|
if (((attrId instanceof $c_Lio_kaitai_struct_format_RawIdentifier) || (attrId instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier))) {
|
|
84485
84554
|
return (void 0)
|
|
84486
84555
|
};
|
|
84487
|
-
var name =
|
|
84556
|
+
var name = $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(attrId);
|
|
84488
84557
|
var x = $m_Lio_kaitai_struct_format_NoRepeat$();
|
|
84489
84558
|
if ((x === rep)) {
|
|
84490
84559
|
this.out$2.puts__T__V((((("self._debug['" + name) + "']['end'] = ") + io) + ".pos()"))
|
|
@@ -84499,27 +84568,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.attrDebugEnd__Lio_kaitai
|
|
|
84499
84568
|
}
|
|
84500
84569
|
}
|
|
84501
84570
|
});
|
|
84502
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.publicMemberName__Lio_kaitai_struct_format_Identifier__T = (function(id) {
|
|
84503
|
-
if ((id instanceof $c_Lio_kaitai_struct_format_SpecialIdentifier)) {
|
|
84504
|
-
var x2 = $as_Lio_kaitai_struct_format_SpecialIdentifier(id);
|
|
84505
|
-
var name = x2.name$2;
|
|
84506
|
-
return name
|
|
84507
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_NamedIdentifier)) {
|
|
84508
|
-
var x3 = $as_Lio_kaitai_struct_format_NamedIdentifier(id);
|
|
84509
|
-
var name$2 = x3.name$2;
|
|
84510
|
-
return name$2
|
|
84511
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_InstanceIdentifier)) {
|
|
84512
|
-
var x4 = $as_Lio_kaitai_struct_format_InstanceIdentifier(id);
|
|
84513
|
-
var name$3 = x4.name$2;
|
|
84514
|
-
return name$3
|
|
84515
|
-
} else if ((id instanceof $c_Lio_kaitai_struct_format_RawIdentifier)) {
|
|
84516
|
-
var x5 = $as_Lio_kaitai_struct_format_RawIdentifier(id);
|
|
84517
|
-
var innerId = x5.innerId$2;
|
|
84518
|
-
return ("_raw_" + this.publicMemberName__Lio_kaitai_struct_format_Identifier__T(innerId))
|
|
84519
|
-
} else {
|
|
84520
|
-
throw new $c_s_MatchError().init___O(id)
|
|
84521
|
-
}
|
|
84522
|
-
});
|
|
84523
84571
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.bytesPadTermExpr__T__s_Option__s_Option__Z__T = (function(expr0, padRight, terminator, include) {
|
|
84524
84572
|
if ((padRight instanceof $c_s_Some)) {
|
|
84525
84573
|
var x2 = $as_s_Some(padRight);
|
|
@@ -84599,9 +84647,9 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.switchIfCaseFirstStart__
|
|
|
84599
84647
|
this.out$2.inc__V()
|
|
84600
84648
|
});
|
|
84601
84649
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
84602
|
-
this.out$2.puts__T__V((("if hasattr(self, '" +
|
|
84650
|
+
this.out$2.puts__T__V((("if hasattr(self, '" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(instName)) + "'):"));
|
|
84603
84651
|
this.out$2.inc__V();
|
|
84604
|
-
this.
|
|
84652
|
+
this.out$2.puts__T__V(("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
|
|
84605
84653
|
this.out$2.dec__V();
|
|
84606
84654
|
var this$1 = this.out$2;
|
|
84607
84655
|
this$1.sb$2.append__T__scm_StringBuilder("\n")
|
|
@@ -84695,7 +84743,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorHeader__
|
|
|
84695
84743
|
return (function(p$2) {
|
|
84696
84744
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
84697
84745
|
var id = p.id$1;
|
|
84698
|
-
return $
|
|
84746
|
+
return $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id)
|
|
84699
84747
|
})
|
|
84700
84748
|
})(this);
|
|
84701
84749
|
var this$1 = $m_sci_List$();
|
|
@@ -84744,7 +84792,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorHeader__
|
|
|
84744
84792
|
var p$3 = $as_Lio_kaitai_struct_format_ParamDefSpec(arg1$3);
|
|
84745
84793
|
var jsx$3 = p$3.id$1;
|
|
84746
84794
|
var id$1 = p$3.id$1;
|
|
84747
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$3,
|
|
84795
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(jsx$3, $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(id$1));
|
|
84748
84796
|
var this$4 = these$1;
|
|
84749
84797
|
these$1 = this$4.tail__sci_List()
|
|
84750
84798
|
};
|
|
@@ -84754,15 +84802,6 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.classConstructorHeader__
|
|
|
84754
84802
|
this.out$2.puts__T__V("self._debug = collections.defaultdict(dict)")
|
|
84755
84803
|
}
|
|
84756
84804
|
});
|
|
84757
|
-
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.condRepeatUntilFooter__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_NeedRaw__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(id, io, dataType, needRaw, untilExpr) {
|
|
84758
|
-
this.typeProvider$1.$$undcurrentIteratorType$1 = new $c_s_Some().init___O(dataType);
|
|
84759
|
-
this.out$2.puts__T__V((("if " + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, untilExpr)) + ":"));
|
|
84760
|
-
this.out$2.inc__V();
|
|
84761
|
-
this.out$2.puts__T__V("break");
|
|
84762
|
-
this.out$2.dec__V();
|
|
84763
|
-
this.out$2.puts__T__V("i += 1");
|
|
84764
|
-
this.out$2.dec__V()
|
|
84765
|
-
});
|
|
84766
84805
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.universalFooter__V = (function() {
|
|
84767
84806
|
this.out$2.dec__V();
|
|
84768
84807
|
var this$1 = this.out$2;
|
|
@@ -84776,7 +84815,7 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.instanceCalculate__Lio_k
|
|
|
84776
84815
|
});
|
|
84777
84816
|
$c_Lio_kaitai_struct_languages_PythonCompiler.prototype.allocateIO__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T = (function(varName, rep) {
|
|
84778
84817
|
this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(varName);
|
|
84779
|
-
var ioName = ("_io_" +
|
|
84818
|
+
var ioName = ("_io_" + $m_Lio_kaitai_struct_languages_PythonCompiler$().idToStr__Lio_kaitai_struct_format_Identifier__T(varName));
|
|
84780
84819
|
var args = this.getRawIdExpr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_format_RepeatSpec__T(varName, rep);
|
|
84781
84820
|
this.out$2.puts__T__V((((ioName + " = KaitaiStream(BytesIO(") + args) + "))"));
|
|
84782
84821
|
return ioName
|