kaitai-struct-compiler 0.10.0-SNAPSHOT20210701.214453.6e9a5c9a → 0.10.0-SNAPSHOT20220205.181311.1b9e1fdf
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 +1086 -234
- package/package.json +1 -1
|
@@ -1290,135 +1290,6 @@ function $isArrayOf_Lio_kaitai_struct_exprlang_Ast$cmpop(obj, depth) {
|
|
|
1290
1290
|
function $asArrayOf_Lio_kaitai_struct_exprlang_Ast$cmpop(obj, depth) {
|
|
1291
1291
|
return (($isArrayOf_Lio_kaitai_struct_exprlang_Ast$cmpop(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.Ast$cmpop;", depth))
|
|
1292
1292
|
}
|
|
1293
|
-
function $f_Lio_kaitai_struct_exprlang_Ast$expr__evaluateIntConst__s_Option($thiz) {
|
|
1294
|
-
var nonLocalReturnKey1 = new $c_O().init___();
|
|
1295
|
-
try {
|
|
1296
|
-
if (($thiz instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum)) {
|
|
1297
|
-
var x2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum($thiz);
|
|
1298
|
-
var x = x2.n$1;
|
|
1299
|
-
return new $c_s_Some().init___O(x)
|
|
1300
|
-
} else if (($thiz instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
|
|
1301
|
-
var x3 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp($thiz);
|
|
1302
|
-
var op = x3.op$1;
|
|
1303
|
-
var operand = x3.operand$1;
|
|
1304
|
-
var this$1 = $f_Lio_kaitai_struct_exprlang_Ast$expr__evaluateIntConst__s_Option(operand);
|
|
1305
|
-
if (this$1.isEmpty__Z()) {
|
|
1306
|
-
return $m_s_None$()
|
|
1307
|
-
} else {
|
|
1308
|
-
var arg1 = this$1.get__O();
|
|
1309
|
-
var opValue = $as_s_math_BigInt(arg1);
|
|
1310
|
-
var x$1 = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Invert$();
|
|
1311
|
-
if ((x$1 === op)) {
|
|
1312
|
-
var jsx$1 = opValue.unary$und$tilde__s_math_BigInt()
|
|
1313
|
-
} else {
|
|
1314
|
-
var x$3 = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$();
|
|
1315
|
-
if ((x$3 === op)) {
|
|
1316
|
-
var jsx$1;
|
|
1317
|
-
throw new $c_sr_NonLocalReturnControl().init___O__O(nonLocalReturnKey1, $m_s_None$())
|
|
1318
|
-
} else {
|
|
1319
|
-
var x$5 = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Minus$();
|
|
1320
|
-
if ((x$5 === op)) {
|
|
1321
|
-
var jsx$1 = opValue.unary$und$minus__s_math_BigInt()
|
|
1322
|
-
} else {
|
|
1323
|
-
var jsx$1;
|
|
1324
|
-
throw new $c_s_MatchError().init___O(op)
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
};
|
|
1328
|
-
return new $c_s_Some().init___O(jsx$1)
|
|
1329
|
-
}
|
|
1330
|
-
} else if (($thiz instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp)) {
|
|
1331
|
-
var x4 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BinOp($thiz);
|
|
1332
|
-
var left = x4.left$1;
|
|
1333
|
-
var op$2 = x4.op$1;
|
|
1334
|
-
var right = x4.right$1;
|
|
1335
|
-
var x1$2 = $f_Lio_kaitai_struct_exprlang_Ast$expr__evaluateIntConst__s_Option(left);
|
|
1336
|
-
if ((!(x1$2 instanceof $c_s_Some))) {
|
|
1337
|
-
var x$3$1 = $m_s_None$();
|
|
1338
|
-
if ((x$3$1 === x1$2)) {
|
|
1339
|
-
return $m_s_None$()
|
|
1340
|
-
};
|
|
1341
|
-
throw new $c_s_MatchError().init___O(x1$2)
|
|
1342
|
-
};
|
|
1343
|
-
var x2$2 = $as_s_Some(x1$2);
|
|
1344
|
-
var x$2 = $as_s_math_BigInt(x2$2.value$2);
|
|
1345
|
-
var x1$3 = $f_Lio_kaitai_struct_exprlang_Ast$expr__evaluateIntConst__s_Option(right);
|
|
1346
|
-
if ((!(x1$3 instanceof $c_s_Some))) {
|
|
1347
|
-
var x$6 = $m_s_None$();
|
|
1348
|
-
if ((x$6 === x1$3)) {
|
|
1349
|
-
return $m_s_None$()
|
|
1350
|
-
};
|
|
1351
|
-
throw new $c_s_MatchError().init___O(x1$3)
|
|
1352
|
-
};
|
|
1353
|
-
var x2$3 = $as_s_Some(x1$3);
|
|
1354
|
-
var x$5$1 = $as_s_math_BigInt(x2$3.value$2);
|
|
1355
|
-
var x$8 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
1356
|
-
if ((x$8 === op$2)) {
|
|
1357
|
-
return new $c_s_Some().init___O(x$2.$$plus__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1358
|
-
} else {
|
|
1359
|
-
var x$10 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$();
|
|
1360
|
-
if ((x$10 === op$2)) {
|
|
1361
|
-
return new $c_s_Some().init___O(x$2.$$minus__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1362
|
-
} else {
|
|
1363
|
-
var x$12 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mult$();
|
|
1364
|
-
if ((x$12 === op$2)) {
|
|
1365
|
-
return new $c_s_Some().init___O(x$2.$$times__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1366
|
-
} else {
|
|
1367
|
-
var x$14 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
|
|
1368
|
-
if ((x$14 === op$2)) {
|
|
1369
|
-
return new $c_s_Some().init___O(x$2.$$div__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1370
|
-
} else {
|
|
1371
|
-
var x$16 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
|
|
1372
|
-
if ((x$16 === op$2)) {
|
|
1373
|
-
return new $c_s_Some().init___O(x$2.$$percent__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1374
|
-
} else {
|
|
1375
|
-
var x$18 = $m_Lio_kaitai_struct_exprlang_Ast$operator$LShift$();
|
|
1376
|
-
if ((x$18 === op$2)) {
|
|
1377
|
-
return new $c_s_Some().init___O(x$2.$$less$less__I__s_math_BigInt(x$5$1.bigInteger$3.intValue__I()))
|
|
1378
|
-
} else {
|
|
1379
|
-
var x$20 = $m_Lio_kaitai_struct_exprlang_Ast$operator$RShift$();
|
|
1380
|
-
if ((x$20 === op$2)) {
|
|
1381
|
-
return new $c_s_Some().init___O(x$2.$$greater$greater__I__s_math_BigInt(x$5$1.bigInteger$3.intValue__I()))
|
|
1382
|
-
} else {
|
|
1383
|
-
var x$22 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitOr$();
|
|
1384
|
-
if ((x$22 === op$2)) {
|
|
1385
|
-
return new $c_s_Some().init___O(x$2.$$bar__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1386
|
-
} else {
|
|
1387
|
-
var x$24 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
|
|
1388
|
-
if ((x$24 === op$2)) {
|
|
1389
|
-
return new $c_s_Some().init___O(x$2.$$up__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1390
|
-
} else {
|
|
1391
|
-
var x$26 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitAnd$();
|
|
1392
|
-
if ((x$26 === op$2)) {
|
|
1393
|
-
return new $c_s_Some().init___O(x$2.$$amp__s_math_BigInt__s_math_BigInt(x$5$1))
|
|
1394
|
-
} else {
|
|
1395
|
-
throw new $c_s_MatchError().init___O(op$2)
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
} else {
|
|
1407
|
-
return $m_s_None$()
|
|
1408
|
-
}
|
|
1409
|
-
} catch (e) {
|
|
1410
|
-
if ((e instanceof $c_sr_NonLocalReturnControl)) {
|
|
1411
|
-
var ex = $as_sr_NonLocalReturnControl(e);
|
|
1412
|
-
if ((ex.key$2 === nonLocalReturnKey1)) {
|
|
1413
|
-
return $as_s_Option(ex.value__O())
|
|
1414
|
-
} else {
|
|
1415
|
-
throw ex
|
|
1416
|
-
}
|
|
1417
|
-
} else {
|
|
1418
|
-
throw e
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
1293
|
function $is_Lio_kaitai_struct_exprlang_Ast$expr(obj) {
|
|
1423
1294
|
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_kaitai_struct_exprlang_Ast$expr)))
|
|
1424
1295
|
}
|
|
@@ -1443,6 +1314,18 @@ function $isArrayOf_Lio_kaitai_struct_exprlang_Ast$operator(obj, depth) {
|
|
|
1443
1314
|
function $asArrayOf_Lio_kaitai_struct_exprlang_Ast$operator(obj, depth) {
|
|
1444
1315
|
return (($isArrayOf_Lio_kaitai_struct_exprlang_Ast$operator(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.Ast$operator;", depth))
|
|
1445
1316
|
}
|
|
1317
|
+
function $is_Lio_kaitai_struct_exprlang_ConstEvaluator$value(obj) {
|
|
1318
|
+
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_kaitai_struct_exprlang_ConstEvaluator$value)))
|
|
1319
|
+
}
|
|
1320
|
+
function $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value(obj) {
|
|
1321
|
+
return (($is_Lio_kaitai_struct_exprlang_ConstEvaluator$value(obj) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.exprlang.ConstEvaluator$value"))
|
|
1322
|
+
}
|
|
1323
|
+
function $isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value(obj, depth) {
|
|
1324
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_exprlang_ConstEvaluator$value)))
|
|
1325
|
+
}
|
|
1326
|
+
function $asArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value(obj, depth) {
|
|
1327
|
+
return (($isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.ConstEvaluator$value;", depth))
|
|
1328
|
+
}
|
|
1446
1329
|
function $is_Lio_kaitai_struct_format_ProcessExpr(obj) {
|
|
1447
1330
|
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.Lio_kaitai_struct_format_ProcessExpr)))
|
|
1448
1331
|
}
|
|
@@ -4530,9 +4413,9 @@ function $h_Lio_kaitai_struct_Version$() {
|
|
|
4530
4413
|
$h_Lio_kaitai_struct_Version$.prototype = $c_Lio_kaitai_struct_Version$.prototype;
|
|
4531
4414
|
$c_Lio_kaitai_struct_Version$.prototype.init___ = (function() {
|
|
4532
4415
|
this.name$1 = "kaitai-struct-compiler-js";
|
|
4533
|
-
this.version$1 = "0.10-
|
|
4534
|
-
this.gitCommit$1 = "
|
|
4535
|
-
this.gitTime$1 = "
|
|
4416
|
+
this.version$1 = "0.10-SNAPSHOT20220205.181311.1b9e1fdf";
|
|
4417
|
+
this.gitCommit$1 = "1b9e1fdf";
|
|
4418
|
+
this.gitTime$1 = "2022-02-05T18:13:11+00:00";
|
|
4536
4419
|
return this
|
|
4537
4420
|
});
|
|
4538
4421
|
var $d_Lio_kaitai_struct_Version$ = new $TypeData().initClass({
|
|
@@ -4757,7 +4640,6 @@ function $c_Lio_kaitai_struct_datatype_DataType$() {
|
|
|
4757
4640
|
this.ReIntType$1 = null;
|
|
4758
4641
|
this.ReFloatType$1 = null;
|
|
4759
4642
|
this.ReBitType$1 = null;
|
|
4760
|
-
this.ReUserTypeWithArgs$1 = null;
|
|
4761
4643
|
this.RePureIntType$1 = null;
|
|
4762
4644
|
this.RePureFloatType$1 = null
|
|
4763
4645
|
}
|
|
@@ -4783,18 +4665,14 @@ $c_Lio_kaitai_struct_datatype_DataType$.prototype.init___ = (function() {
|
|
|
4783
4665
|
var groupNames$2 = $m_sci_Nil$();
|
|
4784
4666
|
var $$this$2 = this$8.repr$1;
|
|
4785
4667
|
this.ReBitType$1 = new $c_s_util_matching_Regex().init___T__sc_Seq($$this$2, groupNames$2);
|
|
4786
|
-
var this$11 = new $c_sci_StringOps().init___T("
|
|
4668
|
+
var this$11 = new $c_sci_StringOps().init___T("([us])(2|4|8)");
|
|
4787
4669
|
var groupNames$3 = $m_sci_Nil$();
|
|
4788
4670
|
var $$this$3 = this$11.repr$1;
|
|
4789
|
-
this.
|
|
4790
|
-
var this$14 = new $c_sci_StringOps().init___T("(
|
|
4671
|
+
this.RePureIntType$1 = new $c_s_util_matching_Regex().init___T__sc_Seq($$this$3, groupNames$3);
|
|
4672
|
+
var this$14 = new $c_sci_StringOps().init___T("f(4|8)");
|
|
4791
4673
|
var groupNames$4 = $m_sci_Nil$();
|
|
4792
4674
|
var $$this$4 = this$14.repr$1;
|
|
4793
|
-
this.
|
|
4794
|
-
var this$17 = new $c_sci_StringOps().init___T("f(4|8)");
|
|
4795
|
-
var groupNames$5 = $m_sci_Nil$();
|
|
4796
|
-
var $$this$5 = this$17.repr$1;
|
|
4797
|
-
this.RePureFloatType$1 = new $c_s_util_matching_Regex().init___T__sc_Seq($$this$5, groupNames$5);
|
|
4675
|
+
this.RePureFloatType$1 = new $c_s_util_matching_Regex().init___T__sc_Seq($$this$4, groupNames$4);
|
|
4798
4676
|
return this
|
|
4799
4677
|
});
|
|
4800
4678
|
$c_Lio_kaitai_struct_datatype_DataType$.prototype.pureFromString__s_Option__s_Option__sci_List__Lio_kaitai_struct_datatype_DataType = (function(dto, enumRef, path) {
|
|
@@ -4975,47 +4853,17 @@ $c_Lio_kaitai_struct_datatype_DataType$.prototype.fromYaml__s_Option__sci_List__
|
|
|
4975
4853
|
var r = new $c_Lio_kaitai_struct_datatype_DataType$StrFromBytesType().init___Lio_kaitai_struct_datatype_DataType$BytesType__T(bat, enc);
|
|
4976
4854
|
break matchEnd10
|
|
4977
4855
|
};
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
var x1$9_$_$$und2$f;
|
|
4981
|
-
var o7 = this.ReUserTypeWithArgs$1.unapplySeq__jl_CharSequence__s_Option(dt);
|
|
4982
|
-
if ((!o7.isEmpty__Z())) {
|
|
4983
|
-
if ((o7.get__O() !== null)) {
|
|
4984
|
-
var this$17 = $as_sc_LinearSeqOptimized(o7.get__O());
|
|
4985
|
-
var jsx$7 = ($f_sc_LinearSeqOptimized__lengthCompare__I__I(this$17, 2) === 0)
|
|
4986
|
-
} else {
|
|
4987
|
-
var jsx$7 = false
|
|
4988
|
-
}
|
|
4989
|
-
} else {
|
|
4990
|
-
var jsx$7 = false
|
|
4991
|
-
};
|
|
4992
|
-
if (jsx$7) {
|
|
4993
|
-
var this$18 = $as_sc_LinearSeqOptimized(o7.get__O());
|
|
4994
|
-
var typeStr = $as_T($f_sc_LinearSeqOptimized__apply__I__O(this$18, 0));
|
|
4995
|
-
var this$19 = $as_sc_LinearSeqOptimized(o7.get__O());
|
|
4996
|
-
var argsStr = $as_T($f_sc_LinearSeqOptimized__apply__I__O(this$19, 1));
|
|
4997
|
-
var this$20 = $m_Lio_kaitai_struct_exprlang_Expressions$();
|
|
4998
|
-
var _2$1 = $as_sc_Seq(this$20.realParse__p1__T__Lfastparse_core_Parser__O(argsStr, this$20.topExprList$1));
|
|
4999
|
-
var x1$9_$_$$und1$f = typeStr;
|
|
5000
|
-
var x1$9_$_$$und2$f = _2$1;
|
|
5001
|
-
break matchEnd4$2
|
|
5002
|
-
};
|
|
5003
|
-
var _2$2 = $m_sci_Nil$();
|
|
5004
|
-
var x1$9_$_$$und1$f = dt;
|
|
5005
|
-
var x1$9_$_$$und2$f = _2$2
|
|
5006
|
-
};
|
|
5007
|
-
var arglessType = $as_T(x1$9_$_$$und1$f);
|
|
5008
|
-
var args = $as_sc_Seq(x1$9_$_$$und2$f);
|
|
5009
|
-
var dtl = this.classNameToList__T__sci_List(arglessType);
|
|
4856
|
+
var this$17 = $m_Lio_kaitai_struct_exprlang_Expressions$();
|
|
4857
|
+
var typeWithArgs = $as_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(this$17.realParse__p1__T__Lfastparse_core_Parser__O(dt, this$17.typeRef$1));
|
|
5010
4858
|
if (((arg.size$1.isEmpty__Z() && (!arg.sizeEos$1)) && arg.terminator$1.isEmpty__Z())) {
|
|
5011
4859
|
if (arg.process$1.isDefined__Z()) {
|
|
5012
|
-
var this$
|
|
5013
|
-
throw new $c_Lio_kaitai_struct_problems_CompilationProblemException().init___Lio_kaitai_struct_problems_CompilationProblem(this$
|
|
4860
|
+
var this$19 = new $c_Lio_kaitai_struct_problems_KSYParseError().init___T__sci_List__s_Option((("user type '" + dt) + "': need 'size' / 'size-eos' / 'terminator' if 'process' is used"), path, $m_s_None$());
|
|
4861
|
+
throw new $c_Lio_kaitai_struct_problems_CompilationProblemException().init___Lio_kaitai_struct_problems_CompilationProblem(this$19)
|
|
5014
4862
|
};
|
|
5015
|
-
var r = new $c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream().init___sci_List__s_Option__sc_Seq(
|
|
4863
|
+
var r = new $c_Lio_kaitai_struct_datatype_DataType$UserTypeInstream().init___sci_List__s_Option__sc_Seq(typeWithArgs.typeName$1.names$1.toList__sci_List(), arg.parent$1, typeWithArgs.arguments$1.elts$1)
|
|
5016
4864
|
} else {
|
|
5017
4865
|
var bat$2 = arg.getByteArrayType__sci_List__Lio_kaitai_struct_datatype_DataType$BytesType(path);
|
|
5018
|
-
var r = new $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes().init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option(
|
|
4866
|
+
var r = new $c_Lio_kaitai_struct_datatype_DataType$UserTypeFromBytes().init___sci_List__s_Option__sc_Seq__Lio_kaitai_struct_datatype_DataType$BytesType__s_Option(typeWithArgs.typeName$1.names$1.toList__sci_List(), arg.parent$1, typeWithArgs.arguments$1.elts$1, bat$2, arg.process$1)
|
|
5019
4867
|
}
|
|
5020
4868
|
}
|
|
5021
4869
|
};
|
|
@@ -5457,6 +5305,455 @@ function $m_Lio_kaitai_struct_exprlang_Ast$() {
|
|
|
5457
5305
|
return $n_Lio_kaitai_struct_exprlang_Ast$
|
|
5458
5306
|
}
|
|
5459
5307
|
/** @constructor */
|
|
5308
|
+
function $c_Lio_kaitai_struct_exprlang_ConstEvaluator$() {
|
|
5309
|
+
$c_O.call(this)
|
|
5310
|
+
}
|
|
5311
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype = new $h_O();
|
|
5312
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype.constructor = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$;
|
|
5313
|
+
/** @constructor */
|
|
5314
|
+
function $h_Lio_kaitai_struct_exprlang_ConstEvaluator$() {
|
|
5315
|
+
/*<skip>*/
|
|
5316
|
+
}
|
|
5317
|
+
$h_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype;
|
|
5318
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype.init___ = (function() {
|
|
5319
|
+
return this
|
|
5320
|
+
});
|
|
5321
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value = (function(ex) {
|
|
5322
|
+
var nonLocalReturnKey1 = new $c_O().init___();
|
|
5323
|
+
try {
|
|
5324
|
+
var rc20 = false;
|
|
5325
|
+
var x5 = null;
|
|
5326
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum)) {
|
|
5327
|
+
var x2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(ex);
|
|
5328
|
+
var x = x2.n$1;
|
|
5329
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int().init___s_math_BigInt(x)
|
|
5330
|
+
};
|
|
5331
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool)) {
|
|
5332
|
+
var x3 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(ex);
|
|
5333
|
+
var x$2 = x3.n$1;
|
|
5334
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool().init___Z(x$2)
|
|
5335
|
+
};
|
|
5336
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Str)) {
|
|
5337
|
+
var x4 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Str(ex);
|
|
5338
|
+
var x$3 = x4.s$1;
|
|
5339
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str().init___T(x$3)
|
|
5340
|
+
};
|
|
5341
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp)) {
|
|
5342
|
+
rc20 = true;
|
|
5343
|
+
x5 = $as_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp(ex);
|
|
5344
|
+
var op = x5.op$1;
|
|
5345
|
+
var p6 = x5.operand$1;
|
|
5346
|
+
if ((p6 instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IntNum)) {
|
|
5347
|
+
var x7 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IntNum(p6);
|
|
5348
|
+
var operand = x7.n$1;
|
|
5349
|
+
var x$4 = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Invert$();
|
|
5350
|
+
if ((x$4 === op)) {
|
|
5351
|
+
var jsx$1 = operand.unary$und$tilde__s_math_BigInt()
|
|
5352
|
+
} else {
|
|
5353
|
+
var x$6 = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Minus$();
|
|
5354
|
+
if ((x$6 === op)) {
|
|
5355
|
+
var jsx$1 = operand.unary$und$minus__s_math_BigInt()
|
|
5356
|
+
} else {
|
|
5357
|
+
var jsx$1;
|
|
5358
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$()
|
|
5359
|
+
}
|
|
5360
|
+
};
|
|
5361
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int().init___s_math_BigInt(jsx$1)
|
|
5362
|
+
}
|
|
5363
|
+
};
|
|
5364
|
+
if (rc20) {
|
|
5365
|
+
var p9 = x5.op$1;
|
|
5366
|
+
var p10 = x5.operand$1;
|
|
5367
|
+
var x$8 = $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$();
|
|
5368
|
+
if (((x$8 === p9) && (p10 instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Bool))) {
|
|
5369
|
+
var x11 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Bool(p10);
|
|
5370
|
+
var operand$2 = x11.n$1;
|
|
5371
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool().init___Z((!operand$2))
|
|
5372
|
+
}
|
|
5373
|
+
};
|
|
5374
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BinOp)) {
|
|
5375
|
+
var x12 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BinOp(ex);
|
|
5376
|
+
var left = x12.left$1;
|
|
5377
|
+
var op$2 = x12.op$1;
|
|
5378
|
+
var right = x12.right$1;
|
|
5379
|
+
var leftValue = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(left);
|
|
5380
|
+
var rightValue = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(right);
|
|
5381
|
+
var x$10 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
5382
|
+
if (((x$10 === op$2) && (leftValue instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str))) {
|
|
5383
|
+
var x5$2 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(leftValue);
|
|
5384
|
+
var l = x5$2.value$1;
|
|
5385
|
+
if ((rightValue instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
5386
|
+
var x6 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(rightValue);
|
|
5387
|
+
var r = x6.value$1;
|
|
5388
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str().init___T((("" + l) + r))
|
|
5389
|
+
}
|
|
5390
|
+
};
|
|
5391
|
+
if ((leftValue instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5392
|
+
var x10 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(leftValue);
|
|
5393
|
+
var l$2 = x10.value$1;
|
|
5394
|
+
if ((rightValue instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5395
|
+
var x11$2 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(rightValue);
|
|
5396
|
+
var r$2 = x11$2.value$1;
|
|
5397
|
+
var x$12 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Add$();
|
|
5398
|
+
if ((x$12 === op$2)) {
|
|
5399
|
+
var jsx$2 = l$2.$$plus__s_math_BigInt__s_math_BigInt(r$2)
|
|
5400
|
+
} else {
|
|
5401
|
+
var x$14 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Sub$();
|
|
5402
|
+
if ((x$14 === op$2)) {
|
|
5403
|
+
var jsx$2 = l$2.$$minus__s_math_BigInt__s_math_BigInt(r$2)
|
|
5404
|
+
} else {
|
|
5405
|
+
var x$16 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mult$();
|
|
5406
|
+
if ((x$16 === op$2)) {
|
|
5407
|
+
var jsx$2 = l$2.$$times__s_math_BigInt__s_math_BigInt(r$2)
|
|
5408
|
+
} else {
|
|
5409
|
+
var x$18 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Div$();
|
|
5410
|
+
if ((x$18 === op$2)) {
|
|
5411
|
+
var jsx$2 = l$2.$$div__s_math_BigInt__s_math_BigInt(r$2)
|
|
5412
|
+
} else {
|
|
5413
|
+
var x$20 = $m_Lio_kaitai_struct_exprlang_Ast$operator$Mod$();
|
|
5414
|
+
if ((x$20 === op$2)) {
|
|
5415
|
+
var res = l$2.$$percent__s_math_BigInt__s_math_BigInt(r$2);
|
|
5416
|
+
var this$1 = $m_s_math_BigInt$();
|
|
5417
|
+
var that = this$1.apply__I__s_math_BigInt(0);
|
|
5418
|
+
if ($f_s_math_Ordered__$$less__O__Z(res, that)) {
|
|
5419
|
+
var jsx$2 = res.$$plus__s_math_BigInt__s_math_BigInt(r$2)
|
|
5420
|
+
} else {
|
|
5421
|
+
var jsx$2 = res
|
|
5422
|
+
}
|
|
5423
|
+
} else {
|
|
5424
|
+
var x$22 = $m_Lio_kaitai_struct_exprlang_Ast$operator$LShift$();
|
|
5425
|
+
if ((x$22 === op$2)) {
|
|
5426
|
+
var jsx$2 = l$2.$$less$less__I__s_math_BigInt(r$2.bigInteger$3.intValue__I())
|
|
5427
|
+
} else {
|
|
5428
|
+
var x$24 = $m_Lio_kaitai_struct_exprlang_Ast$operator$RShift$();
|
|
5429
|
+
if ((x$24 === op$2)) {
|
|
5430
|
+
var jsx$2 = l$2.$$greater$greater__I__s_math_BigInt(r$2.bigInteger$3.intValue__I())
|
|
5431
|
+
} else {
|
|
5432
|
+
var x$26 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitOr$();
|
|
5433
|
+
if ((x$26 === op$2)) {
|
|
5434
|
+
var jsx$2 = l$2.$$bar__s_math_BigInt__s_math_BigInt(r$2)
|
|
5435
|
+
} else {
|
|
5436
|
+
var x$28 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitXor$();
|
|
5437
|
+
if ((x$28 === op$2)) {
|
|
5438
|
+
var jsx$2 = l$2.$$up__s_math_BigInt__s_math_BigInt(r$2)
|
|
5439
|
+
} else {
|
|
5440
|
+
var x$30 = $m_Lio_kaitai_struct_exprlang_Ast$operator$BitAnd$();
|
|
5441
|
+
if ((x$30 === op$2)) {
|
|
5442
|
+
var jsx$2 = l$2.$$amp__s_math_BigInt__s_math_BigInt(r$2)
|
|
5443
|
+
} else {
|
|
5444
|
+
var jsx$2;
|
|
5445
|
+
throw new $c_s_MatchError().init___O(op$2)
|
|
5446
|
+
}
|
|
5447
|
+
}
|
|
5448
|
+
}
|
|
5449
|
+
}
|
|
5450
|
+
}
|
|
5451
|
+
}
|
|
5452
|
+
}
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
};
|
|
5456
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int().init___s_math_BigInt(jsx$2)
|
|
5457
|
+
}
|
|
5458
|
+
};
|
|
5459
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$()
|
|
5460
|
+
};
|
|
5461
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp)) {
|
|
5462
|
+
var x13 = $as_Lio_kaitai_struct_exprlang_Ast$expr$BoolOp(ex);
|
|
5463
|
+
var op$3 = x13.op$1;
|
|
5464
|
+
var values = x13.values$1;
|
|
5465
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool().init___Z($uZ(values.foldLeft__O__F2__O(true, new $c_sjsr_AnonFunction2().init___sjs_js_Function2((function($this, nonLocalReturnKey1$1, op$3$1) {
|
|
5466
|
+
return (function(acc$2, right$2$2) {
|
|
5467
|
+
var acc = $uZ(acc$2);
|
|
5468
|
+
var right$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr(right$2$2);
|
|
5469
|
+
var x1 = $m_Lio_kaitai_struct_exprlang_ConstEvaluator$().evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(right$2);
|
|
5470
|
+
if ((!(x1 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool))) {
|
|
5471
|
+
throw new $c_sr_NonLocalReturnControl().init___O__O(nonLocalReturnKey1$1, $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$())
|
|
5472
|
+
};
|
|
5473
|
+
var x2$1 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(x1);
|
|
5474
|
+
var x$1 = x2$1.value$1;
|
|
5475
|
+
var x$2$1 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$And$();
|
|
5476
|
+
if ((x$2$1 === op$3$1)) {
|
|
5477
|
+
return (acc && x$1)
|
|
5478
|
+
} else {
|
|
5479
|
+
var x$4$1 = $m_Lio_kaitai_struct_exprlang_Ast$boolop$Or$();
|
|
5480
|
+
if ((x$4$1 === op$3$1)) {
|
|
5481
|
+
return (acc || x$1)
|
|
5482
|
+
} else {
|
|
5483
|
+
throw new $c_s_MatchError().init___O(op$3$1)
|
|
5484
|
+
}
|
|
5485
|
+
}
|
|
5486
|
+
})
|
|
5487
|
+
})(this, nonLocalReturnKey1, op$3)))))
|
|
5488
|
+
};
|
|
5489
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Compare)) {
|
|
5490
|
+
var x14 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Compare(ex);
|
|
5491
|
+
var left$2 = x14.left$1;
|
|
5492
|
+
var op$4 = x14.ops$1;
|
|
5493
|
+
var right$3 = x14.right$1;
|
|
5494
|
+
var leftValue$2 = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(left$2);
|
|
5495
|
+
var rightValue$2 = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(right$3);
|
|
5496
|
+
matchEnd87: {
|
|
5497
|
+
var jsx$3;
|
|
5498
|
+
var x$32 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
5499
|
+
if (((x$32 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int))) {
|
|
5500
|
+
var x5$3 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(leftValue$2);
|
|
5501
|
+
var l$3 = x5$3.value$1;
|
|
5502
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5503
|
+
var x6$2 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(rightValue$2);
|
|
5504
|
+
var r$3 = x6$2.value$1;
|
|
5505
|
+
var jsx$3 = ((l$3 === null) ? (r$3 === null) : l$3.equals__O__Z(r$3));
|
|
5506
|
+
break matchEnd87
|
|
5507
|
+
}
|
|
5508
|
+
};
|
|
5509
|
+
var x$36 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
5510
|
+
if (((x$36 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool))) {
|
|
5511
|
+
var x10$2 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(leftValue$2);
|
|
5512
|
+
var l$4 = x10$2.value$1;
|
|
5513
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool)) {
|
|
5514
|
+
var x11$3 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(rightValue$2);
|
|
5515
|
+
var r$4 = x11$3.value$1;
|
|
5516
|
+
var jsx$3 = (l$4 === r$4);
|
|
5517
|
+
break matchEnd87
|
|
5518
|
+
}
|
|
5519
|
+
};
|
|
5520
|
+
var x$38 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Eq$();
|
|
5521
|
+
if (((x$38 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str))) {
|
|
5522
|
+
var x15 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(leftValue$2);
|
|
5523
|
+
var l$5 = x15.value$1;
|
|
5524
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
5525
|
+
var x16 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(rightValue$2);
|
|
5526
|
+
var r$5 = x16.value$1;
|
|
5527
|
+
var jsx$3 = (l$5 === r$5);
|
|
5528
|
+
break matchEnd87
|
|
5529
|
+
}
|
|
5530
|
+
};
|
|
5531
|
+
var x$40 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
5532
|
+
if (((x$40 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int))) {
|
|
5533
|
+
var x20 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(leftValue$2);
|
|
5534
|
+
var l$6 = x20.value$1;
|
|
5535
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5536
|
+
var x21 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(rightValue$2);
|
|
5537
|
+
var r$6 = x21.value$1;
|
|
5538
|
+
var jsx$3 = (!((l$6 === null) ? (r$6 === null) : l$6.equals__O__Z(r$6)));
|
|
5539
|
+
break matchEnd87
|
|
5540
|
+
}
|
|
5541
|
+
};
|
|
5542
|
+
var x$44 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
5543
|
+
if (((x$44 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool))) {
|
|
5544
|
+
var x25 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(leftValue$2);
|
|
5545
|
+
var l$7 = x25.value$1;
|
|
5546
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool)) {
|
|
5547
|
+
var x26 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(rightValue$2);
|
|
5548
|
+
var r$7 = x26.value$1;
|
|
5549
|
+
var jsx$3 = (l$7 !== r$7);
|
|
5550
|
+
break matchEnd87
|
|
5551
|
+
}
|
|
5552
|
+
};
|
|
5553
|
+
var x$46 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$NotEq$();
|
|
5554
|
+
if (((x$46 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str))) {
|
|
5555
|
+
var x30 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(leftValue$2);
|
|
5556
|
+
var l$8 = x30.value$1;
|
|
5557
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
5558
|
+
var x31 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(rightValue$2);
|
|
5559
|
+
var r$8 = x31.value$1;
|
|
5560
|
+
var jsx$3 = (l$8 !== r$8);
|
|
5561
|
+
break matchEnd87
|
|
5562
|
+
}
|
|
5563
|
+
};
|
|
5564
|
+
var x$48 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Lt$();
|
|
5565
|
+
if (((x$48 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int))) {
|
|
5566
|
+
var x35 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(leftValue$2);
|
|
5567
|
+
var l$9 = x35.value$1;
|
|
5568
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5569
|
+
var x36 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(rightValue$2);
|
|
5570
|
+
var r$9 = x36.value$1;
|
|
5571
|
+
var jsx$3 = $f_s_math_Ordered__$$less__O__Z(l$9, r$9);
|
|
5572
|
+
break matchEnd87
|
|
5573
|
+
}
|
|
5574
|
+
};
|
|
5575
|
+
var x$50 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$LtE$();
|
|
5576
|
+
if (((x$50 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int))) {
|
|
5577
|
+
var x40 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(leftValue$2);
|
|
5578
|
+
var l$10 = x40.value$1;
|
|
5579
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5580
|
+
var x41 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(rightValue$2);
|
|
5581
|
+
var r$10 = x41.value$1;
|
|
5582
|
+
var jsx$3 = $f_s_math_Ordered__$$less$eq__O__Z(l$10, r$10);
|
|
5583
|
+
break matchEnd87
|
|
5584
|
+
}
|
|
5585
|
+
};
|
|
5586
|
+
var x$52 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Gt$();
|
|
5587
|
+
if (((x$52 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int))) {
|
|
5588
|
+
var x45 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(leftValue$2);
|
|
5589
|
+
var l$11 = x45.value$1;
|
|
5590
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5591
|
+
var x46 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(rightValue$2);
|
|
5592
|
+
var r$11 = x46.value$1;
|
|
5593
|
+
var jsx$3 = $f_s_math_Ordered__$$greater__O__Z(l$11, r$11);
|
|
5594
|
+
break matchEnd87
|
|
5595
|
+
}
|
|
5596
|
+
};
|
|
5597
|
+
var x$54 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$GtE$();
|
|
5598
|
+
if (((x$54 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int))) {
|
|
5599
|
+
var x50 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(leftValue$2);
|
|
5600
|
+
var l$12 = x50.value$1;
|
|
5601
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5602
|
+
var x51 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(rightValue$2);
|
|
5603
|
+
var r$12 = x51.value$1;
|
|
5604
|
+
var jsx$3 = $f_s_math_Ordered__$$greater$eq__O__Z(l$12, r$12);
|
|
5605
|
+
break matchEnd87
|
|
5606
|
+
}
|
|
5607
|
+
};
|
|
5608
|
+
var x$56 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Lt$();
|
|
5609
|
+
if (((x$56 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str))) {
|
|
5610
|
+
var x55 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(leftValue$2);
|
|
5611
|
+
var l$13 = x55.value$1;
|
|
5612
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
5613
|
+
var x56 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(rightValue$2);
|
|
5614
|
+
var r$13 = x56.value$1;
|
|
5615
|
+
var this$3 = new $c_sci_StringOps().init___T(l$13);
|
|
5616
|
+
var jsx$3 = $f_s_math_Ordered__$$less__O__Z(this$3, r$13);
|
|
5617
|
+
break matchEnd87
|
|
5618
|
+
}
|
|
5619
|
+
};
|
|
5620
|
+
var x$58 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$LtE$();
|
|
5621
|
+
if (((x$58 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str))) {
|
|
5622
|
+
var x60 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(leftValue$2);
|
|
5623
|
+
var l$14 = x60.value$1;
|
|
5624
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
5625
|
+
var x61 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(rightValue$2);
|
|
5626
|
+
var r$14 = x61.value$1;
|
|
5627
|
+
var this$5 = new $c_sci_StringOps().init___T(l$14);
|
|
5628
|
+
var jsx$3 = $f_s_math_Ordered__$$less$eq__O__Z(this$5, r$14);
|
|
5629
|
+
break matchEnd87
|
|
5630
|
+
}
|
|
5631
|
+
};
|
|
5632
|
+
var x$60 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$Gt$();
|
|
5633
|
+
if (((x$60 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str))) {
|
|
5634
|
+
var x65 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(leftValue$2);
|
|
5635
|
+
var l$15 = x65.value$1;
|
|
5636
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
5637
|
+
var x66 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(rightValue$2);
|
|
5638
|
+
var r$15 = x66.value$1;
|
|
5639
|
+
var this$7 = new $c_sci_StringOps().init___T(l$15);
|
|
5640
|
+
var jsx$3 = $f_s_math_Ordered__$$greater__O__Z(this$7, r$15);
|
|
5641
|
+
break matchEnd87
|
|
5642
|
+
}
|
|
5643
|
+
};
|
|
5644
|
+
var x$62 = $m_Lio_kaitai_struct_exprlang_Ast$cmpop$GtE$();
|
|
5645
|
+
if (((x$62 === op$4) && (leftValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str))) {
|
|
5646
|
+
var x70 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(leftValue$2);
|
|
5647
|
+
var l$16 = x70.value$1;
|
|
5648
|
+
if ((rightValue$2 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
5649
|
+
var x71 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(rightValue$2);
|
|
5650
|
+
var r$16 = x71.value$1;
|
|
5651
|
+
var this$9 = new $c_sci_StringOps().init___T(l$16);
|
|
5652
|
+
var jsx$3 = $f_s_math_Ordered__$$greater$eq__O__Z(this$9, r$16);
|
|
5653
|
+
break matchEnd87
|
|
5654
|
+
}
|
|
5655
|
+
};
|
|
5656
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$()
|
|
5657
|
+
};
|
|
5658
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool().init___Z(jsx$3)
|
|
5659
|
+
};
|
|
5660
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$IfExp)) {
|
|
5661
|
+
var x15$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$IfExp(ex);
|
|
5662
|
+
var condition = x15$2.condition$1;
|
|
5663
|
+
var ifTrue = x15$2.ifTrue$1;
|
|
5664
|
+
var ifFalse = x15$2.ifFalse$1;
|
|
5665
|
+
var x1$6 = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(condition);
|
|
5666
|
+
if ((x1$6 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool)) {
|
|
5667
|
+
var x2$2 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(x1$6);
|
|
5668
|
+
var cond = x2$2.value$1;
|
|
5669
|
+
return (cond ? this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(ifTrue) : this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(ifFalse))
|
|
5670
|
+
} else {
|
|
5671
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$()
|
|
5672
|
+
}
|
|
5673
|
+
};
|
|
5674
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$List)) {
|
|
5675
|
+
var x16$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr$List(ex);
|
|
5676
|
+
var list = x16$2.elts$1;
|
|
5677
|
+
var jsx$4 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$2$1) {
|
|
5678
|
+
return (function(ex$2$2) {
|
|
5679
|
+
var ex$2 = $as_Lio_kaitai_struct_exprlang_Ast$expr(ex$2$2);
|
|
5680
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$().evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(ex$2)
|
|
5681
|
+
})
|
|
5682
|
+
})(this));
|
|
5683
|
+
var this$10 = $m_sc_Seq$();
|
|
5684
|
+
return new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List().init___sc_Seq($as_sc_Seq(list.map__F1__scg_CanBuildFrom__O(jsx$4, this$10.ReusableCBFInstance$2)))
|
|
5685
|
+
};
|
|
5686
|
+
if ((ex instanceof $c_Lio_kaitai_struct_exprlang_Ast$expr$Subscript)) {
|
|
5687
|
+
var x17 = $as_Lio_kaitai_struct_exprlang_Ast$expr$Subscript(ex);
|
|
5688
|
+
var container = x17.value$1;
|
|
5689
|
+
var index = x17.idx$1;
|
|
5690
|
+
var x1$7 = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(index);
|
|
5691
|
+
matchEnd4$2: {
|
|
5692
|
+
var idx;
|
|
5693
|
+
if ((x1$7 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5694
|
+
var x2$3 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(x1$7);
|
|
5695
|
+
var x$64 = x2$3.value$1;
|
|
5696
|
+
var this$11 = $m_s_math_BigInt$();
|
|
5697
|
+
var that$1 = this$11.apply__I__s_math_BigInt(0);
|
|
5698
|
+
if ($f_s_math_Ordered__$$greater$eq__O__Z(x$64, that$1)) {
|
|
5699
|
+
var idx = x$64;
|
|
5700
|
+
break matchEnd4$2
|
|
5701
|
+
}
|
|
5702
|
+
};
|
|
5703
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$()
|
|
5704
|
+
};
|
|
5705
|
+
var x1$8 = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(container);
|
|
5706
|
+
if ((x1$8 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List)) {
|
|
5707
|
+
var x2$4 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List(x1$8);
|
|
5708
|
+
var list$2 = x2$4.list$1;
|
|
5709
|
+
var this$12 = $m_s_math_BigInt$();
|
|
5710
|
+
var i = list$2.length__I();
|
|
5711
|
+
var that$2 = this$12.apply__I__s_math_BigInt(i);
|
|
5712
|
+
if ($f_s_math_Ordered__$$less__O__Z(idx, that$2)) {
|
|
5713
|
+
return $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value(list$2.apply__I__O(idx.bigInteger$3.intValue__I()))
|
|
5714
|
+
}
|
|
5715
|
+
};
|
|
5716
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$()
|
|
5717
|
+
};
|
|
5718
|
+
return $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$()
|
|
5719
|
+
} catch (e) {
|
|
5720
|
+
if ((e instanceof $c_sr_NonLocalReturnControl)) {
|
|
5721
|
+
var ex$3 = $as_sr_NonLocalReturnControl(e);
|
|
5722
|
+
if ((ex$3.key$2 === nonLocalReturnKey1)) {
|
|
5723
|
+
return $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value(ex$3.value__O())
|
|
5724
|
+
} else {
|
|
5725
|
+
throw ex$3
|
|
5726
|
+
}
|
|
5727
|
+
} else {
|
|
5728
|
+
throw e
|
|
5729
|
+
}
|
|
5730
|
+
}
|
|
5731
|
+
});
|
|
5732
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype.evaluateIntConst__Lio_kaitai_struct_exprlang_Ast$expr__s_Option = (function(ex) {
|
|
5733
|
+
var x1 = this.evaluate__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_ConstEvaluator$value(ex);
|
|
5734
|
+
if ((x1 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
5735
|
+
var x2 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(x1);
|
|
5736
|
+
var x = x2.value$1;
|
|
5737
|
+
return new $c_s_Some().init___O(x)
|
|
5738
|
+
} else {
|
|
5739
|
+
return $m_s_None$()
|
|
5740
|
+
}
|
|
5741
|
+
});
|
|
5742
|
+
var $d_Lio_kaitai_struct_exprlang_ConstEvaluator$ = new $TypeData().initClass({
|
|
5743
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$: 0
|
|
5744
|
+
}, false, "io.kaitai.struct.exprlang.ConstEvaluator$", {
|
|
5745
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$: 1,
|
|
5746
|
+
O: 1
|
|
5747
|
+
});
|
|
5748
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$.prototype.$classData = $d_Lio_kaitai_struct_exprlang_ConstEvaluator$;
|
|
5749
|
+
var $n_Lio_kaitai_struct_exprlang_ConstEvaluator$ = (void 0);
|
|
5750
|
+
function $m_Lio_kaitai_struct_exprlang_ConstEvaluator$() {
|
|
5751
|
+
if ((!$n_Lio_kaitai_struct_exprlang_ConstEvaluator$)) {
|
|
5752
|
+
$n_Lio_kaitai_struct_exprlang_ConstEvaluator$ = new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$().init___()
|
|
5753
|
+
};
|
|
5754
|
+
return $n_Lio_kaitai_struct_exprlang_ConstEvaluator$
|
|
5755
|
+
}
|
|
5756
|
+
/** @constructor */
|
|
5460
5757
|
function $c_Lio_kaitai_struct_exprlang_Expressions$() {
|
|
5461
5758
|
$c_O.call(this);
|
|
5462
5759
|
this.NAME$1 = null;
|
|
@@ -5507,7 +5804,8 @@ function $c_Lio_kaitai_struct_exprlang_Expressions$() {
|
|
|
5507
5804
|
this.byteSizeOfType$1 = null;
|
|
5508
5805
|
this.bitSizeOfType$1 = null;
|
|
5509
5806
|
this.topExpr$1 = null;
|
|
5510
|
-
this.topExprList$1 = null
|
|
5807
|
+
this.topExprList$1 = null;
|
|
5808
|
+
this.typeRef$1 = null
|
|
5511
5809
|
}
|
|
5512
5810
|
$c_Lio_kaitai_struct_exprlang_Expressions$.prototype = new $h_O();
|
|
5513
5811
|
$c_Lio_kaitai_struct_exprlang_Expressions$.prototype.constructor = $c_Lio_kaitai_struct_exprlang_Expressions$;
|
|
@@ -6363,6 +6661,60 @@ $c_Lio_kaitai_struct_exprlang_Expressions$.prototype.init___ = (function() {
|
|
|
6363
6661
|
})(this));
|
|
6364
6662
|
var name$32 = new $c_Lsourcecode_Name().init___T("topExprList");
|
|
6365
6663
|
this.topExprList$1 = new $c_Lfastparse_parsers_Combinators$Rule().init___T__F0__Lfastparse_utils_ReprOps(name$32.value$2, p$32, this$186.implicitReprOps$1);
|
|
6664
|
+
var this$198 = $m_Lio_kaitai_struct_exprlang_WsApi$();
|
|
6665
|
+
var this$197 = $m_Lfastparse_noApi$();
|
|
6666
|
+
var p$33 = new $c_sjsr_AnonFunction0().init___sjs_js_Function0((function(this$50$1) {
|
|
6667
|
+
return (function() {
|
|
6668
|
+
var this$195 = $m_Lio_kaitai_struct_exprlang_WsApi$();
|
|
6669
|
+
var this$188 = $m_Lio_kaitai_struct_exprlang_WsApi$();
|
|
6670
|
+
var this$187 = $m_Lio_kaitai_struct_exprlang_WsApi$();
|
|
6671
|
+
var p0$89 = $m_Lfastparse_noApi$().Start$1;
|
|
6672
|
+
var p0$90 = new $c_Lfastparse_WhitespaceApi().init___Lfastparse_core_Parser__Lfastparse_core_Parser(p0$89, this$187.WL$1).$$tilde__Lfastparse_core_Parser__Lfastparse_core_Implicits$Sequencer__Lfastparse_core_Parser($m_Lio_kaitai_struct_exprlang_Expressions$().TYPE$undNAME$1, $m_Lfastparse_core_Implicits$Sequencer$().SingleSequencer__Lfastparse_core_Implicits$Sequencer());
|
|
6673
|
+
var jsx$71 = new $c_Lfastparse_WhitespaceApi().init___Lfastparse_core_Parser__Lfastparse_core_Parser(p0$90, this$188.WL$1);
|
|
6674
|
+
var this$192 = $m_Lio_kaitai_struct_exprlang_WsApi$();
|
|
6675
|
+
var this$190 = $m_Lio_kaitai_struct_exprlang_WsApi$();
|
|
6676
|
+
var this$189 = $m_Lio_kaitai_struct_exprlang_WsApi$();
|
|
6677
|
+
var p0$91 = new $c_Lfastparse_WhitespaceApi().init___Lfastparse_core_Parser__Lfastparse_core_Parser($m_Lfastparse_noApi$().LiteralStr__T__Lfastparse_core_Parser("("), this$189.WL$1).$$tilde__Lfastparse_core_Parser__Lfastparse_core_Implicits$Sequencer__Lfastparse_core_Parser($m_Lio_kaitai_struct_exprlang_Expressions$().list$1, $m_Lfastparse_core_Implicits$Sequencer$().SingleSequencer__Lfastparse_core_Implicits$Sequencer());
|
|
6678
|
+
var jsx$69 = new $c_Lfastparse_WhitespaceApi().init___Lfastparse_core_Parser__Lfastparse_core_Parser(p0$91, this$190.WL$1);
|
|
6679
|
+
var jsx$68 = $m_Lfastparse_noApi$().LiteralStr__T__Lfastparse_core_Parser(")");
|
|
6680
|
+
var this$191 = $m_Lfastparse_core_Implicits$Sequencer$();
|
|
6681
|
+
var p0$92 = jsx$69.$$tilde__Lfastparse_core_Parser__Lfastparse_core_Implicits$Sequencer__Lfastparse_core_Parser(jsx$68, $f_Lfastparse_core_Implicits$LowPriSequencer__UnitSequencer__Lfastparse_core_Implicits$Sequencer(this$191));
|
|
6682
|
+
var jsx$70 = new $c_Lfastparse_WhitespaceApi().init___Lfastparse_core_Parser__Lfastparse_core_Parser(p0$92, this$192.WL$1);
|
|
6683
|
+
var this$193 = $m_Lfastparse_core_Implicits$Optioner$();
|
|
6684
|
+
var jsx$67 = jsx$70.$$qmark__Lfastparse_core_Implicits$Optioner__Lfastparse_core_Parser(new $c_Lfastparse_core_Implicits$LowPriOptioner$GenericOptioner().init___Lfastparse_core_Implicits$LowPriOptioner(this$193));
|
|
6685
|
+
var this$194 = $m_Lfastparse_core_Implicits$Sequencer$();
|
|
6686
|
+
var p0$93 = jsx$71.$$tilde__Lfastparse_core_Parser__Lfastparse_core_Implicits$Sequencer__Lfastparse_core_Parser(jsx$67, $as_Lfastparse_core_Implicits$Sequencer($f_Lfastparse_core_LowestPriSequencer__Sequencer1__O(this$194)));
|
|
6687
|
+
var jsx$72 = new $c_Lfastparse_WhitespaceApi().init___Lfastparse_core_Parser__Lfastparse_core_Parser(p0$93, this$195.WL$1);
|
|
6688
|
+
var jsx$66 = $m_Lfastparse_noApi$().End$1;
|
|
6689
|
+
var this$196 = $m_Lfastparse_core_Implicits$Sequencer$();
|
|
6690
|
+
return jsx$72.$$tilde__Lfastparse_core_Parser__Lfastparse_core_Implicits$Sequencer__Lfastparse_core_Parser(jsx$66, $f_Lfastparse_core_Implicits$LowPriSequencer__UnitSequencer__Lfastparse_core_Implicits$Sequencer(this$196))
|
|
6691
|
+
})
|
|
6692
|
+
})(this));
|
|
6693
|
+
var name$33 = new $c_Lsourcecode_Name().init___T("typeRef");
|
|
6694
|
+
var p0$94 = new $c_Lfastparse_parsers_Combinators$Rule().init___T__F0__Lfastparse_utils_ReprOps(name$33.value$2, p$33, this$197.implicitReprOps$1);
|
|
6695
|
+
this.typeRef$1 = new $c_Lfastparse_WhitespaceApi().init___Lfastparse_core_Parser__Lfastparse_core_Parser(p0$94, this$198.WL$1).map__F1__Lfastparse_core_Parser(new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function(this$51$1) {
|
|
6696
|
+
return (function(x0$10$2) {
|
|
6697
|
+
var x0$10 = $as_T2(x0$10$2);
|
|
6698
|
+
if ((x0$10 !== null)) {
|
|
6699
|
+
var path = $as_Lio_kaitai_struct_exprlang_Ast$typeId(x0$10.$$und1__O());
|
|
6700
|
+
var p2$2 = $as_s_Option(x0$10.$$und2__O());
|
|
6701
|
+
var x$9 = $m_s_None$();
|
|
6702
|
+
if ((x$9 === p2$2)) {
|
|
6703
|
+
return new $c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments().init___Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_exprlang_Ast$expr$List(path, new $c_Lio_kaitai_struct_exprlang_Ast$expr$List().init___sc_Seq($as_sc_Seq($m_sc_Seq$().apply__sc_Seq__sc_GenTraversable($m_sci_Nil$()))))
|
|
6704
|
+
}
|
|
6705
|
+
};
|
|
6706
|
+
if ((x0$10 !== null)) {
|
|
6707
|
+
var path$2 = $as_Lio_kaitai_struct_exprlang_Ast$typeId(x0$10.$$und1__O());
|
|
6708
|
+
var p3$2 = $as_s_Option(x0$10.$$und2__O());
|
|
6709
|
+
if ((p3$2 instanceof $c_s_Some)) {
|
|
6710
|
+
var x4$2 = $as_s_Some(p3$2);
|
|
6711
|
+
var args = $as_Lio_kaitai_struct_exprlang_Ast$expr$List(x4$2.value$2);
|
|
6712
|
+
return new $c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments().init___Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_exprlang_Ast$expr$List(path$2, args)
|
|
6713
|
+
}
|
|
6714
|
+
};
|
|
6715
|
+
throw new $c_s_MatchError().init___O(x0$10)
|
|
6716
|
+
})
|
|
6717
|
+
})(this)));
|
|
6366
6718
|
return this
|
|
6367
6719
|
});
|
|
6368
6720
|
$c_Lio_kaitai_struct_exprlang_Expressions$.prototype.op__Lfastparse_core_Parser__O__Lfastparse_core_Parser = (function(s, rhs) {
|
|
@@ -9211,7 +9563,7 @@ $c_Lio_kaitai_struct_precompile_CalculateSeqSizes$.prototype.dataTypeByteSize__L
|
|
|
9211
9563
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesLimitType)) {
|
|
9212
9564
|
var x11 = $as_Lio_kaitai_struct_datatype_DataType$BytesLimitType(x1);
|
|
9213
9565
|
var this$1 = x11.size$2;
|
|
9214
|
-
var x1$2 = $
|
|
9566
|
+
var x1$2 = $m_Lio_kaitai_struct_exprlang_ConstEvaluator$().evaluateIntConst__Lio_kaitai_struct_exprlang_Ast$expr__s_Option(this$1);
|
|
9215
9567
|
if ((x1$2 instanceof $c_s_Some)) {
|
|
9216
9568
|
var x2$2 = $as_s_Some(x1$2);
|
|
9217
9569
|
var x$2 = $as_s_math_BigInt(x2$2.value$2);
|
|
@@ -9256,7 +9608,7 @@ $c_Lio_kaitai_struct_precompile_CalculateSeqSizes$.prototype.sizeMultiply__Lio_k
|
|
|
9256
9608
|
} else if ((repeat instanceof $c_Lio_kaitai_struct_format_RepeatExpr)) {
|
|
9257
9609
|
var x2$2 = $as_Lio_kaitai_struct_format_RepeatExpr(repeat);
|
|
9258
9610
|
var expr = x2$2.expr$1;
|
|
9259
|
-
var x1$3 = $
|
|
9611
|
+
var x1$3 = $m_Lio_kaitai_struct_exprlang_ConstEvaluator$().evaluateIntConst__Lio_kaitai_struct_exprlang_Ast$expr__s_Option(expr);
|
|
9260
9612
|
if ((x1$3 instanceof $c_s_Some)) {
|
|
9261
9613
|
var x2$3 = $as_s_Some(x1$3);
|
|
9262
9614
|
var count = $as_s_math_BigInt(x2$3.value$2);
|
|
@@ -26519,7 +26871,7 @@ $c_Lio_kaitai_struct_NimClassCompiler.prototype.compileInstance__sci_List__Lio_k
|
|
|
26519
26871
|
} else {
|
|
26520
26872
|
throw new $c_s_MatchError().init___O(instSpec)
|
|
26521
26873
|
};
|
|
26522
|
-
this.lang$1.
|
|
26874
|
+
this.lang$1.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V(instName, dataType);
|
|
26523
26875
|
this.lang$1.instanceFooter__V()
|
|
26524
26876
|
});
|
|
26525
26877
|
$c_Lio_kaitai_struct_NimClassCompiler.prototype.compileSeq__sci_List__s_Option__V = (function(seq, defEndian) {
|
|
@@ -39361,6 +39713,93 @@ var $d_Lio_kaitai_struct_RuntimeConfig = new $TypeData().initClass({
|
|
|
39361
39713
|
});
|
|
39362
39714
|
$c_Lio_kaitai_struct_RuntimeConfig.prototype.$classData = $d_Lio_kaitai_struct_RuntimeConfig;
|
|
39363
39715
|
/** @constructor */
|
|
39716
|
+
function $c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments() {
|
|
39717
|
+
$c_O.call(this);
|
|
39718
|
+
this.typeName$1 = null;
|
|
39719
|
+
this.arguments$1 = null
|
|
39720
|
+
}
|
|
39721
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype = new $h_O();
|
|
39722
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.constructor = $c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments;
|
|
39723
|
+
/** @constructor */
|
|
39724
|
+
function $h_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments() {
|
|
39725
|
+
/*<skip>*/
|
|
39726
|
+
}
|
|
39727
|
+
$h_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype = $c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype;
|
|
39728
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.init___Lio_kaitai_struct_exprlang_Ast$typeId__Lio_kaitai_struct_exprlang_Ast$expr$List = (function(typeName, arguments$2) {
|
|
39729
|
+
this.typeName$1 = typeName;
|
|
39730
|
+
this.arguments$1 = arguments$2;
|
|
39731
|
+
return this
|
|
39732
|
+
});
|
|
39733
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.productPrefix__T = (function() {
|
|
39734
|
+
return "TypeWithArguments"
|
|
39735
|
+
});
|
|
39736
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.productArity__I = (function() {
|
|
39737
|
+
return 2
|
|
39738
|
+
});
|
|
39739
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.equals__O__Z = (function(x$1) {
|
|
39740
|
+
if ((this === x$1)) {
|
|
39741
|
+
return true
|
|
39742
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments)) {
|
|
39743
|
+
var TypeWithArguments$1 = $as_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(x$1);
|
|
39744
|
+
var x = this.typeName$1;
|
|
39745
|
+
var x$2 = TypeWithArguments$1.typeName$1;
|
|
39746
|
+
if (((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))) {
|
|
39747
|
+
var x$3 = this.arguments$1;
|
|
39748
|
+
var x$4 = TypeWithArguments$1.arguments$1;
|
|
39749
|
+
return ((x$3 === null) ? (x$4 === null) : x$3.equals__O__Z(x$4))
|
|
39750
|
+
} else {
|
|
39751
|
+
return false
|
|
39752
|
+
}
|
|
39753
|
+
} else {
|
|
39754
|
+
return false
|
|
39755
|
+
}
|
|
39756
|
+
});
|
|
39757
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.productElement__I__O = (function(x$1) {
|
|
39758
|
+
switch (x$1) {
|
|
39759
|
+
case 0: {
|
|
39760
|
+
return this.typeName$1;
|
|
39761
|
+
break
|
|
39762
|
+
}
|
|
39763
|
+
case 1: {
|
|
39764
|
+
return this.arguments$1;
|
|
39765
|
+
break
|
|
39766
|
+
}
|
|
39767
|
+
default: {
|
|
39768
|
+
throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
|
|
39769
|
+
}
|
|
39770
|
+
}
|
|
39771
|
+
});
|
|
39772
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.toString__T = (function() {
|
|
39773
|
+
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
39774
|
+
});
|
|
39775
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.hashCode__I = (function() {
|
|
39776
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
39777
|
+
return this$2.productHash__s_Product__I__I(this, (-889275714))
|
|
39778
|
+
});
|
|
39779
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.productIterator__sc_Iterator = (function() {
|
|
39780
|
+
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
39781
|
+
});
|
|
39782
|
+
function $as_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(obj) {
|
|
39783
|
+
return (((obj instanceof $c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.exprlang.Ast$TypeWithArguments"))
|
|
39784
|
+
}
|
|
39785
|
+
function $isArrayOf_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(obj, depth) {
|
|
39786
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_exprlang_Ast$TypeWithArguments)))
|
|
39787
|
+
}
|
|
39788
|
+
function $asArrayOf_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(obj, depth) {
|
|
39789
|
+
return (($isArrayOf_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.Ast$TypeWithArguments;", depth))
|
|
39790
|
+
}
|
|
39791
|
+
var $d_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments = new $TypeData().initClass({
|
|
39792
|
+
Lio_kaitai_struct_exprlang_Ast$TypeWithArguments: 0
|
|
39793
|
+
}, false, "io.kaitai.struct.exprlang.Ast$TypeWithArguments", {
|
|
39794
|
+
Lio_kaitai_struct_exprlang_Ast$TypeWithArguments: 1,
|
|
39795
|
+
O: 1,
|
|
39796
|
+
s_Product: 1,
|
|
39797
|
+
s_Equals: 1,
|
|
39798
|
+
s_Serializable: 1,
|
|
39799
|
+
Ljava_io_Serializable: 1
|
|
39800
|
+
});
|
|
39801
|
+
$c_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments.prototype.$classData = $d_Lio_kaitai_struct_exprlang_Ast$TypeWithArguments;
|
|
39802
|
+
/** @constructor */
|
|
39364
39803
|
function $c_Lio_kaitai_struct_exprlang_Ast$expr$FloatNum$() {
|
|
39365
39804
|
$c_sr_AbstractFunction1.call(this)
|
|
39366
39805
|
}
|
|
@@ -48269,14 +48708,14 @@ $h_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype = $c_Lio_kaitai_struct_
|
|
|
48269
48708
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.productPrefix__T = (function() {
|
|
48270
48709
|
return "UnaryOp"
|
|
48271
48710
|
});
|
|
48272
|
-
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.productArity__I = (function() {
|
|
48273
|
-
return 2
|
|
48274
|
-
});
|
|
48275
48711
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.init___Lio_kaitai_struct_exprlang_Ast$unaryop__Lio_kaitai_struct_exprlang_Ast$expr = (function(op, operand) {
|
|
48276
48712
|
this.op$1 = op;
|
|
48277
48713
|
this.operand$1 = operand;
|
|
48278
48714
|
return this
|
|
48279
48715
|
});
|
|
48716
|
+
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.productArity__I = (function() {
|
|
48717
|
+
return 2
|
|
48718
|
+
});
|
|
48280
48719
|
$c_Lio_kaitai_struct_exprlang_Ast$expr$UnaryOp.prototype.equals__O__Z = (function(x$1) {
|
|
48281
48720
|
if ((this === x$1)) {
|
|
48282
48721
|
return true
|
|
@@ -49005,6 +49444,358 @@ function $m_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$() {
|
|
|
49005
49444
|
return $n_Lio_kaitai_struct_exprlang_Ast$unaryop$Not$
|
|
49006
49445
|
}
|
|
49007
49446
|
/** @constructor */
|
|
49447
|
+
function $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool() {
|
|
49448
|
+
$c_O.call(this);
|
|
49449
|
+
this.value$1 = false
|
|
49450
|
+
}
|
|
49451
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype = new $h_O();
|
|
49452
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.constructor = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool;
|
|
49453
|
+
/** @constructor */
|
|
49454
|
+
function $h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool() {
|
|
49455
|
+
/*<skip>*/
|
|
49456
|
+
}
|
|
49457
|
+
$h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype;
|
|
49458
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.productPrefix__T = (function() {
|
|
49459
|
+
return "Bool"
|
|
49460
|
+
});
|
|
49461
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.productArity__I = (function() {
|
|
49462
|
+
return 1
|
|
49463
|
+
});
|
|
49464
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.equals__O__Z = (function(x$1) {
|
|
49465
|
+
if ((this === x$1)) {
|
|
49466
|
+
return true
|
|
49467
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool)) {
|
|
49468
|
+
var Bool$1 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(x$1);
|
|
49469
|
+
return (this.value$1 === Bool$1.value$1)
|
|
49470
|
+
} else {
|
|
49471
|
+
return false
|
|
49472
|
+
}
|
|
49473
|
+
});
|
|
49474
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.productElement__I__O = (function(x$1) {
|
|
49475
|
+
switch (x$1) {
|
|
49476
|
+
case 0: {
|
|
49477
|
+
return this.value$1;
|
|
49478
|
+
break
|
|
49479
|
+
}
|
|
49480
|
+
default: {
|
|
49481
|
+
throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
|
|
49482
|
+
}
|
|
49483
|
+
}
|
|
49484
|
+
});
|
|
49485
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.toString__T = (function() {
|
|
49486
|
+
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
49487
|
+
});
|
|
49488
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.hashCode__I = (function() {
|
|
49489
|
+
var acc = (-889275714);
|
|
49490
|
+
acc = $m_sr_Statics$().mix__I__I__I(acc, (this.value$1 ? 1231 : 1237));
|
|
49491
|
+
return $m_sr_Statics$().finalizeHash__I__I__I(acc, 1)
|
|
49492
|
+
});
|
|
49493
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.productIterator__sc_Iterator = (function() {
|
|
49494
|
+
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
49495
|
+
});
|
|
49496
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.init___Z = (function(value) {
|
|
49497
|
+
this.value$1 = value;
|
|
49498
|
+
return this
|
|
49499
|
+
});
|
|
49500
|
+
function $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(obj) {
|
|
49501
|
+
return (((obj instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.exprlang.ConstEvaluator$value$Bool"))
|
|
49502
|
+
}
|
|
49503
|
+
function $isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(obj, depth) {
|
|
49504
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool)))
|
|
49505
|
+
}
|
|
49506
|
+
function $asArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(obj, depth) {
|
|
49507
|
+
return (($isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.ConstEvaluator$value$Bool;", depth))
|
|
49508
|
+
}
|
|
49509
|
+
var $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool = new $TypeData().initClass({
|
|
49510
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool: 0
|
|
49511
|
+
}, false, "io.kaitai.struct.exprlang.ConstEvaluator$value$Bool", {
|
|
49512
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool: 1,
|
|
49513
|
+
O: 1,
|
|
49514
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value: 1,
|
|
49515
|
+
s_Product: 1,
|
|
49516
|
+
s_Equals: 1,
|
|
49517
|
+
s_Serializable: 1,
|
|
49518
|
+
Ljava_io_Serializable: 1
|
|
49519
|
+
});
|
|
49520
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool.prototype.$classData = $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Bool;
|
|
49521
|
+
/** @constructor */
|
|
49522
|
+
function $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int() {
|
|
49523
|
+
$c_O.call(this);
|
|
49524
|
+
this.value$1 = null
|
|
49525
|
+
}
|
|
49526
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype = new $h_O();
|
|
49527
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.constructor = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int;
|
|
49528
|
+
/** @constructor */
|
|
49529
|
+
function $h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int() {
|
|
49530
|
+
/*<skip>*/
|
|
49531
|
+
}
|
|
49532
|
+
$h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype;
|
|
49533
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.productPrefix__T = (function() {
|
|
49534
|
+
return "Int"
|
|
49535
|
+
});
|
|
49536
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.productArity__I = (function() {
|
|
49537
|
+
return 1
|
|
49538
|
+
});
|
|
49539
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.equals__O__Z = (function(x$1) {
|
|
49540
|
+
if ((this === x$1)) {
|
|
49541
|
+
return true
|
|
49542
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)) {
|
|
49543
|
+
var Int$1 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(x$1);
|
|
49544
|
+
var x = this.value$1;
|
|
49545
|
+
var x$2 = Int$1.value$1;
|
|
49546
|
+
return ((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))
|
|
49547
|
+
} else {
|
|
49548
|
+
return false
|
|
49549
|
+
}
|
|
49550
|
+
});
|
|
49551
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.productElement__I__O = (function(x$1) {
|
|
49552
|
+
switch (x$1) {
|
|
49553
|
+
case 0: {
|
|
49554
|
+
return this.value$1;
|
|
49555
|
+
break
|
|
49556
|
+
}
|
|
49557
|
+
default: {
|
|
49558
|
+
throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
|
|
49559
|
+
}
|
|
49560
|
+
}
|
|
49561
|
+
});
|
|
49562
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.toString__T = (function() {
|
|
49563
|
+
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
49564
|
+
});
|
|
49565
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.hashCode__I = (function() {
|
|
49566
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
49567
|
+
return this$2.productHash__s_Product__I__I(this, (-889275714))
|
|
49568
|
+
});
|
|
49569
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.productIterator__sc_Iterator = (function() {
|
|
49570
|
+
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
49571
|
+
});
|
|
49572
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.init___s_math_BigInt = (function(value) {
|
|
49573
|
+
this.value$1 = value;
|
|
49574
|
+
return this
|
|
49575
|
+
});
|
|
49576
|
+
function $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(obj) {
|
|
49577
|
+
return (((obj instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.exprlang.ConstEvaluator$value$Int"))
|
|
49578
|
+
}
|
|
49579
|
+
function $isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(obj, depth) {
|
|
49580
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int)))
|
|
49581
|
+
}
|
|
49582
|
+
function $asArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(obj, depth) {
|
|
49583
|
+
return (($isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.ConstEvaluator$value$Int;", depth))
|
|
49584
|
+
}
|
|
49585
|
+
var $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int = new $TypeData().initClass({
|
|
49586
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int: 0
|
|
49587
|
+
}, false, "io.kaitai.struct.exprlang.ConstEvaluator$value$Int", {
|
|
49588
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int: 1,
|
|
49589
|
+
O: 1,
|
|
49590
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value: 1,
|
|
49591
|
+
s_Product: 1,
|
|
49592
|
+
s_Equals: 1,
|
|
49593
|
+
s_Serializable: 1,
|
|
49594
|
+
Ljava_io_Serializable: 1
|
|
49595
|
+
});
|
|
49596
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int.prototype.$classData = $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Int;
|
|
49597
|
+
/** @constructor */
|
|
49598
|
+
function $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List() {
|
|
49599
|
+
$c_O.call(this);
|
|
49600
|
+
this.list$1 = null
|
|
49601
|
+
}
|
|
49602
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype = new $h_O();
|
|
49603
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.constructor = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List;
|
|
49604
|
+
/** @constructor */
|
|
49605
|
+
function $h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List() {
|
|
49606
|
+
/*<skip>*/
|
|
49607
|
+
}
|
|
49608
|
+
$h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype;
|
|
49609
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.productPrefix__T = (function() {
|
|
49610
|
+
return "List"
|
|
49611
|
+
});
|
|
49612
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.productArity__I = (function() {
|
|
49613
|
+
return 1
|
|
49614
|
+
});
|
|
49615
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.equals__O__Z = (function(x$1) {
|
|
49616
|
+
if ((this === x$1)) {
|
|
49617
|
+
return true
|
|
49618
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List)) {
|
|
49619
|
+
var List$1 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List(x$1);
|
|
49620
|
+
var x = this.list$1;
|
|
49621
|
+
var x$2 = List$1.list$1;
|
|
49622
|
+
return ((x === null) ? (x$2 === null) : x.equals__O__Z(x$2))
|
|
49623
|
+
} else {
|
|
49624
|
+
return false
|
|
49625
|
+
}
|
|
49626
|
+
});
|
|
49627
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.productElement__I__O = (function(x$1) {
|
|
49628
|
+
switch (x$1) {
|
|
49629
|
+
case 0: {
|
|
49630
|
+
return this.list$1;
|
|
49631
|
+
break
|
|
49632
|
+
}
|
|
49633
|
+
default: {
|
|
49634
|
+
throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
|
|
49635
|
+
}
|
|
49636
|
+
}
|
|
49637
|
+
});
|
|
49638
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.toString__T = (function() {
|
|
49639
|
+
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
49640
|
+
});
|
|
49641
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.init___sc_Seq = (function(list) {
|
|
49642
|
+
this.list$1 = list;
|
|
49643
|
+
return this
|
|
49644
|
+
});
|
|
49645
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.hashCode__I = (function() {
|
|
49646
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
49647
|
+
return this$2.productHash__s_Product__I__I(this, (-889275714))
|
|
49648
|
+
});
|
|
49649
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.productIterator__sc_Iterator = (function() {
|
|
49650
|
+
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
49651
|
+
});
|
|
49652
|
+
function $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List(obj) {
|
|
49653
|
+
return (((obj instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.exprlang.ConstEvaluator$value$List"))
|
|
49654
|
+
}
|
|
49655
|
+
function $isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List(obj, depth) {
|
|
49656
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_exprlang_ConstEvaluator$value$List)))
|
|
49657
|
+
}
|
|
49658
|
+
function $asArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List(obj, depth) {
|
|
49659
|
+
return (($isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.ConstEvaluator$value$List;", depth))
|
|
49660
|
+
}
|
|
49661
|
+
var $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List = new $TypeData().initClass({
|
|
49662
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$List: 0
|
|
49663
|
+
}, false, "io.kaitai.struct.exprlang.ConstEvaluator$value$List", {
|
|
49664
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$List: 1,
|
|
49665
|
+
O: 1,
|
|
49666
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value: 1,
|
|
49667
|
+
s_Product: 1,
|
|
49668
|
+
s_Equals: 1,
|
|
49669
|
+
s_Serializable: 1,
|
|
49670
|
+
Ljava_io_Serializable: 1
|
|
49671
|
+
});
|
|
49672
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List.prototype.$classData = $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$List;
|
|
49673
|
+
/** @constructor */
|
|
49674
|
+
function $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$() {
|
|
49675
|
+
$c_O.call(this)
|
|
49676
|
+
}
|
|
49677
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype = new $h_O();
|
|
49678
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.constructor = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$;
|
|
49679
|
+
/** @constructor */
|
|
49680
|
+
function $h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$() {
|
|
49681
|
+
/*<skip>*/
|
|
49682
|
+
}
|
|
49683
|
+
$h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype;
|
|
49684
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.init___ = (function() {
|
|
49685
|
+
return this
|
|
49686
|
+
});
|
|
49687
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.productPrefix__T = (function() {
|
|
49688
|
+
return "NonConst"
|
|
49689
|
+
});
|
|
49690
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.productArity__I = (function() {
|
|
49691
|
+
return 0
|
|
49692
|
+
});
|
|
49693
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.productElement__I__O = (function(x$1) {
|
|
49694
|
+
throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
|
|
49695
|
+
});
|
|
49696
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.toString__T = (function() {
|
|
49697
|
+
return "NonConst"
|
|
49698
|
+
});
|
|
49699
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.hashCode__I = (function() {
|
|
49700
|
+
return 1443412150
|
|
49701
|
+
});
|
|
49702
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.productIterator__sc_Iterator = (function() {
|
|
49703
|
+
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
49704
|
+
});
|
|
49705
|
+
var $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$ = new $TypeData().initClass({
|
|
49706
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$: 0
|
|
49707
|
+
}, false, "io.kaitai.struct.exprlang.ConstEvaluator$value$NonConst$", {
|
|
49708
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$: 1,
|
|
49709
|
+
O: 1,
|
|
49710
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value: 1,
|
|
49711
|
+
s_Product: 1,
|
|
49712
|
+
s_Equals: 1,
|
|
49713
|
+
s_Serializable: 1,
|
|
49714
|
+
Ljava_io_Serializable: 1
|
|
49715
|
+
});
|
|
49716
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$.prototype.$classData = $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$;
|
|
49717
|
+
var $n_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$ = (void 0);
|
|
49718
|
+
function $m_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$() {
|
|
49719
|
+
if ((!$n_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$)) {
|
|
49720
|
+
$n_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$ = new $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$().init___()
|
|
49721
|
+
};
|
|
49722
|
+
return $n_Lio_kaitai_struct_exprlang_ConstEvaluator$value$NonConst$
|
|
49723
|
+
}
|
|
49724
|
+
/** @constructor */
|
|
49725
|
+
function $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str() {
|
|
49726
|
+
$c_O.call(this);
|
|
49727
|
+
this.value$1 = null
|
|
49728
|
+
}
|
|
49729
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype = new $h_O();
|
|
49730
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.constructor = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str;
|
|
49731
|
+
/** @constructor */
|
|
49732
|
+
function $h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str() {
|
|
49733
|
+
/*<skip>*/
|
|
49734
|
+
}
|
|
49735
|
+
$h_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype = $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype;
|
|
49736
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.productPrefix__T = (function() {
|
|
49737
|
+
return "Str"
|
|
49738
|
+
});
|
|
49739
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.productArity__I = (function() {
|
|
49740
|
+
return 1
|
|
49741
|
+
});
|
|
49742
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.equals__O__Z = (function(x$1) {
|
|
49743
|
+
if ((this === x$1)) {
|
|
49744
|
+
return true
|
|
49745
|
+
} else if ((x$1 instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)) {
|
|
49746
|
+
var Str$1 = $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(x$1);
|
|
49747
|
+
return (this.value$1 === Str$1.value$1)
|
|
49748
|
+
} else {
|
|
49749
|
+
return false
|
|
49750
|
+
}
|
|
49751
|
+
});
|
|
49752
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.productElement__I__O = (function(x$1) {
|
|
49753
|
+
switch (x$1) {
|
|
49754
|
+
case 0: {
|
|
49755
|
+
return this.value$1;
|
|
49756
|
+
break
|
|
49757
|
+
}
|
|
49758
|
+
default: {
|
|
49759
|
+
throw new $c_jl_IndexOutOfBoundsException().init___T(("" + x$1))
|
|
49760
|
+
}
|
|
49761
|
+
}
|
|
49762
|
+
});
|
|
49763
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.toString__T = (function() {
|
|
49764
|
+
return $m_sr_ScalaRunTime$().$$undtoString__s_Product__T(this)
|
|
49765
|
+
});
|
|
49766
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.init___T = (function(value) {
|
|
49767
|
+
this.value$1 = value;
|
|
49768
|
+
return this
|
|
49769
|
+
});
|
|
49770
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.hashCode__I = (function() {
|
|
49771
|
+
var this$2 = $m_s_util_hashing_MurmurHash3$();
|
|
49772
|
+
return this$2.productHash__s_Product__I__I(this, (-889275714))
|
|
49773
|
+
});
|
|
49774
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.productIterator__sc_Iterator = (function() {
|
|
49775
|
+
return new $c_sr_ScalaRunTime$$anon$1().init___s_Product(this)
|
|
49776
|
+
});
|
|
49777
|
+
function $as_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(obj) {
|
|
49778
|
+
return (((obj instanceof $c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str) || (obj === null)) ? obj : $throwClassCastException(obj, "io.kaitai.struct.exprlang.ConstEvaluator$value$Str"))
|
|
49779
|
+
}
|
|
49780
|
+
function $isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(obj, depth) {
|
|
49781
|
+
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str)))
|
|
49782
|
+
}
|
|
49783
|
+
function $asArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(obj, depth) {
|
|
49784
|
+
return (($isArrayOf_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str(obj, depth) || (obj === null)) ? obj : $throwArrayCastException(obj, "Lio.kaitai.struct.exprlang.ConstEvaluator$value$Str;", depth))
|
|
49785
|
+
}
|
|
49786
|
+
var $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str = new $TypeData().initClass({
|
|
49787
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str: 0
|
|
49788
|
+
}, false, "io.kaitai.struct.exprlang.ConstEvaluator$value$Str", {
|
|
49789
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str: 1,
|
|
49790
|
+
O: 1,
|
|
49791
|
+
Lio_kaitai_struct_exprlang_ConstEvaluator$value: 1,
|
|
49792
|
+
s_Product: 1,
|
|
49793
|
+
s_Equals: 1,
|
|
49794
|
+
s_Serializable: 1,
|
|
49795
|
+
Ljava_io_Serializable: 1
|
|
49796
|
+
});
|
|
49797
|
+
$c_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str.prototype.$classData = $d_Lio_kaitai_struct_exprlang_ConstEvaluator$value$Str;
|
|
49798
|
+
/** @constructor */
|
|
49008
49799
|
function $c_Lio_kaitai_struct_format_DynamicSized$() {
|
|
49009
49800
|
$c_O.call(this)
|
|
49010
49801
|
}
|
|
@@ -65832,8 +66623,15 @@ $c_Lio_kaitai_struct_translators_JavaTranslator.prototype.doIntLiteral__s_math_B
|
|
|
65832
66623
|
var literal = $m_Ljava_math_Conversion$().toDecimalScaledString__Ljava_math_BigInteger__T(this$3)
|
|
65833
66624
|
};
|
|
65834
66625
|
var this$4 = $m_s_math_BigInt$();
|
|
65835
|
-
var that$1 = this$4.apply__I__s_math_BigInt(
|
|
65836
|
-
if ($f_s_math_Ordered__$$
|
|
66626
|
+
var that$1 = this$4.apply__I__s_math_BigInt((-2147483648));
|
|
66627
|
+
if ($f_s_math_Ordered__$$less__O__Z(n, that$1)) {
|
|
66628
|
+
var jsx$1 = true
|
|
66629
|
+
} else {
|
|
66630
|
+
var this$5 = $m_s_math_BigInt$();
|
|
66631
|
+
var that$2 = this$5.apply__I__s_math_BigInt(2147483647);
|
|
66632
|
+
var jsx$1 = $f_s_math_Ordered__$$greater__O__Z(n, that$2)
|
|
66633
|
+
};
|
|
66634
|
+
if (jsx$1) {
|
|
65837
66635
|
var suffix = "L"
|
|
65838
66636
|
} else {
|
|
65839
66637
|
var suffix = ""
|
|
@@ -66815,7 +67613,19 @@ $c_Lio_kaitai_struct_translators_NimTranslator.prototype.strReverse__Lio_kaitai_
|
|
|
66815
67613
|
return this.strReverse__Lio_kaitai_struct_exprlang_Ast$expr__T(s)
|
|
66816
67614
|
});
|
|
66817
67615
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doByteArrayLiteral__sc_Seq__T = (function(arr) {
|
|
66818
|
-
|
|
67616
|
+
if ((arr.size__I() === 0)) {
|
|
67617
|
+
return "@[]"
|
|
67618
|
+
} else {
|
|
67619
|
+
var jsx$1 = new $c_sjsr_AnonFunction1().init___sjs_js_Function1((function($this) {
|
|
67620
|
+
return (function(b$2) {
|
|
67621
|
+
var b = $uB(b$2);
|
|
67622
|
+
var ub = (255 & b);
|
|
67623
|
+
return ub
|
|
67624
|
+
})
|
|
67625
|
+
})(this));
|
|
67626
|
+
var this$1 = $m_sc_Seq$();
|
|
67627
|
+
return (("@[" + $as_sc_TraversableOnce(arr.map__F1__scg_CanBuildFrom__O(jsx$1, this$1.ReusableCBFInstance$2)).mkString__T__T("'u8, ")) + "'u8]")
|
|
67628
|
+
}
|
|
66819
67629
|
});
|
|
66820
67630
|
$c_Lio_kaitai_struct_translators_NimTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__O = (function(t, value) {
|
|
66821
67631
|
return this.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sc_Seq__T(t, value)
|
|
@@ -79038,26 +79848,41 @@ $c_Lio_kaitai_struct_languages_LuaCompiler.prototype.parseExpr__Lio_kaitai_struc
|
|
|
79038
79848
|
if (x10.isOpaque__Z()) {
|
|
79039
79849
|
var addArgs = ""
|
|
79040
79850
|
} else {
|
|
79851
|
+
var rc8 = false;
|
|
79852
|
+
var x2$2 = null;
|
|
79041
79853
|
var x1$2 = x10.forcedParent$3;
|
|
79042
|
-
|
|
79043
|
-
var
|
|
79044
|
-
|
|
79045
|
-
|
|
79046
|
-
|
|
79047
|
-
|
|
79048
|
-
|
|
79049
|
-
|
|
79854
|
+
matchEnd9: {
|
|
79855
|
+
var parent;
|
|
79856
|
+
if ((x1$2 instanceof $c_s_Some)) {
|
|
79857
|
+
rc8 = true;
|
|
79858
|
+
x2$2 = $as_s_Some(x1$2);
|
|
79859
|
+
var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
|
|
79860
|
+
var x = $m_Lio_kaitai_struct_datatype_DataType$().USER$undTYPE$undNO$undPARENT$1;
|
|
79861
|
+
if (((x === null) ? (p3 === null) : x.equals__O__Z(p3))) {
|
|
79862
|
+
var parent = "nil";
|
|
79863
|
+
break matchEnd9
|
|
79864
|
+
}
|
|
79050
79865
|
};
|
|
79051
|
-
|
|
79866
|
+
if (rc8) {
|
|
79867
|
+
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
|
|
79868
|
+
var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp);
|
|
79869
|
+
break matchEnd9
|
|
79870
|
+
};
|
|
79871
|
+
var x$3 = $m_s_None$();
|
|
79872
|
+
if ((x$3 === x1$2)) {
|
|
79873
|
+
var parent = "self";
|
|
79874
|
+
break matchEnd9
|
|
79875
|
+
};
|
|
79876
|
+
throw new $c_s_MatchError().init___O(x1$2)
|
|
79052
79877
|
};
|
|
79053
79878
|
var x1$3 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).meta$1.endian$1;
|
|
79054
79879
|
matchEnd6: {
|
|
79055
79880
|
var addEndian;
|
|
79056
79881
|
if ((x1$3 instanceof $c_s_Some)) {
|
|
79057
79882
|
var x2$3 = $as_s_Some(x1$3);
|
|
79058
|
-
var p3 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
|
|
79059
|
-
var x$
|
|
79060
|
-
if ((x$
|
|
79883
|
+
var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
|
|
79884
|
+
var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
79885
|
+
if ((x$5 === p3$2)) {
|
|
79061
79886
|
var addEndian = ", self._is_le";
|
|
79062
79887
|
break matchEnd6
|
|
79063
79888
|
}
|
|
@@ -79621,7 +80446,8 @@ function $h_Lio_kaitai_struct_languages_NimCompiler() {
|
|
|
79621
80446
|
}
|
|
79622
80447
|
$h_Lio_kaitai_struct_languages_NimCompiler.prototype = $c_Lio_kaitai_struct_languages_NimCompiler.prototype;
|
|
79623
80448
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
79624
|
-
this.
|
|
80449
|
+
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)));
|
|
80450
|
+
this.out$2.puts__T__V((("`" + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(attrName)) + "`: bool"))
|
|
79625
80451
|
});
|
|
79626
80452
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchEnd__V = (function() {
|
|
79627
80453
|
/*<skip>*/
|
|
@@ -79723,6 +80549,7 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.seek__T__Lio_kaitai_struct_
|
|
|
79723
80549
|
this.out$2.puts__T__V((((io + ".seek(int(") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, pos)) + "))"))
|
|
79724
80550
|
});
|
|
79725
80551
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, attrType) {
|
|
80552
|
+
this.out$2.puts__T__V((("this." + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(instName)) + " = true"));
|
|
79726
80553
|
this.out$2.puts__T__V(("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)))
|
|
79727
80554
|
});
|
|
79728
80555
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V = (function(id, expr) {
|
|
@@ -80201,6 +81028,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.classConstructorFooter__V =
|
|
|
80201
81028
|
$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) {
|
|
80202
81029
|
$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)
|
|
80203
81030
|
});
|
|
81031
|
+
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T = (function(id) {
|
|
81032
|
+
return (this.idToStr__Lio_kaitai_struct_format_Identifier__T(id) + "Flag")
|
|
81033
|
+
});
|
|
80204
81034
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.popPos__T__V = (function(io) {
|
|
80205
81035
|
this.out$2.puts__T__V((io + ".seek(pos)"))
|
|
80206
81036
|
});
|
|
@@ -80374,17 +81204,9 @@ $c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchIfCaseFirstStart__Lio
|
|
|
80374
81204
|
this.out$2.inc__V()
|
|
80375
81205
|
});
|
|
80376
81206
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.instanceCheckCacheAndReturn__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__V = (function(instName, dataType) {
|
|
80377
|
-
if (
|
|
80378
|
-
this.out$2.puts__T__V((("if " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ".len != 0:"))
|
|
80379
|
-
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$StrType)) {
|
|
80380
|
-
this.out$2.puts__T__V((("if " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ".len != 0:"))
|
|
80381
|
-
} else if ((dataType instanceof $c_Lio_kaitai_struct_datatype_DataType$BytesType)) {
|
|
80382
|
-
this.out$2.puts__T__V((("if " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ".len != 0:"))
|
|
80383
|
-
} else {
|
|
80384
|
-
this.out$2.puts__T__V((("if " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + " != nil:"))
|
|
80385
|
-
};
|
|
81207
|
+
this.out$2.puts__T__V((("if this." + this.instanceFlagIdentifier__Lio_kaitai_struct_format_InstanceIdentifier__T(instName)) + ":"));
|
|
80386
81208
|
this.out$2.inc__V();
|
|
80387
|
-
this.
|
|
81209
|
+
this.out$2.puts__T__V(("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
|
|
80388
81210
|
this.out$2.dec__V()
|
|
80389
81211
|
});
|
|
80390
81212
|
$c_Lio_kaitai_struct_languages_NimCompiler.prototype.switchRequiresIfs__Lio_kaitai_struct_datatype_DataType__Z = (function(onType) {
|
|
@@ -80796,26 +81618,41 @@ $c_Lio_kaitai_struct_languages_RubyCompiler.prototype.parseExpr__Lio_kaitai_stru
|
|
|
80796
81618
|
if (x10.isOpaque__Z()) {
|
|
80797
81619
|
var addArgs = ""
|
|
80798
81620
|
} else {
|
|
81621
|
+
var rc8 = false;
|
|
81622
|
+
var x2$2 = null;
|
|
80799
81623
|
var x1$2 = x10.forcedParent$3;
|
|
80800
|
-
|
|
80801
|
-
var
|
|
80802
|
-
|
|
80803
|
-
|
|
80804
|
-
|
|
80805
|
-
|
|
80806
|
-
|
|
80807
|
-
|
|
81624
|
+
matchEnd9: {
|
|
81625
|
+
var parent;
|
|
81626
|
+
if ((x1$2 instanceof $c_s_Some)) {
|
|
81627
|
+
rc8 = true;
|
|
81628
|
+
x2$2 = $as_s_Some(x1$2);
|
|
81629
|
+
var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
|
|
81630
|
+
var x = $m_Lio_kaitai_struct_datatype_DataType$().USER$undTYPE$undNO$undPARENT$1;
|
|
81631
|
+
if (((x === null) ? (p3 === null) : x.equals__O__Z(p3))) {
|
|
81632
|
+
var parent = "nil";
|
|
81633
|
+
break matchEnd9
|
|
81634
|
+
}
|
|
80808
81635
|
};
|
|
80809
|
-
|
|
81636
|
+
if (rc8) {
|
|
81637
|
+
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
|
|
81638
|
+
var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp);
|
|
81639
|
+
break matchEnd9
|
|
81640
|
+
};
|
|
81641
|
+
var x$3 = $m_s_None$();
|
|
81642
|
+
if ((x$3 === x1$2)) {
|
|
81643
|
+
var parent = "self";
|
|
81644
|
+
break matchEnd9
|
|
81645
|
+
};
|
|
81646
|
+
throw new $c_s_MatchError().init___O(x1$2)
|
|
80810
81647
|
};
|
|
80811
81648
|
var x1$3 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).meta$1.endian$1;
|
|
80812
81649
|
matchEnd6: {
|
|
80813
81650
|
var addEndian;
|
|
80814
81651
|
if ((x1$3 instanceof $c_s_Some)) {
|
|
80815
81652
|
var x2$3 = $as_s_Some(x1$3);
|
|
80816
|
-
var p3 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
|
|
80817
|
-
var x$
|
|
80818
|
-
if ((x$
|
|
81653
|
+
var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
|
|
81654
|
+
var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
81655
|
+
if ((x$5 === p3$2)) {
|
|
80819
81656
|
var addEndian = ", @_is_le";
|
|
80820
81657
|
break matchEnd6
|
|
80821
81658
|
}
|
|
@@ -83092,26 +83929,41 @@ $c_Lio_kaitai_struct_languages_PythonCompiler.prototype.parseExpr__Lio_kaitai_st
|
|
|
83092
83929
|
if (x10.isOpaque__Z()) {
|
|
83093
83930
|
var addArgs = ""
|
|
83094
83931
|
} else {
|
|
83932
|
+
var rc8 = false;
|
|
83933
|
+
var x2$2 = null;
|
|
83095
83934
|
var x1$2 = x10.forcedParent$3;
|
|
83096
|
-
|
|
83097
|
-
var
|
|
83098
|
-
|
|
83099
|
-
|
|
83100
|
-
|
|
83101
|
-
|
|
83102
|
-
|
|
83103
|
-
|
|
83935
|
+
matchEnd9: {
|
|
83936
|
+
var parent;
|
|
83937
|
+
if ((x1$2 instanceof $c_s_Some)) {
|
|
83938
|
+
rc8 = true;
|
|
83939
|
+
x2$2 = $as_s_Some(x1$2);
|
|
83940
|
+
var p3 = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
|
|
83941
|
+
var x = $m_Lio_kaitai_struct_datatype_DataType$().USER$undTYPE$undNO$undPARENT$1;
|
|
83942
|
+
if (((x === null) ? (p3 === null) : x.equals__O__Z(p3))) {
|
|
83943
|
+
var parent = "None";
|
|
83944
|
+
break matchEnd9
|
|
83945
|
+
}
|
|
83104
83946
|
};
|
|
83105
|
-
|
|
83947
|
+
if (rc8) {
|
|
83948
|
+
var fp = $as_Lio_kaitai_struct_exprlang_Ast$expr(x2$2.value$2);
|
|
83949
|
+
var parent = this.translator$2.translate__Lio_kaitai_struct_exprlang_Ast$expr__T(fp);
|
|
83950
|
+
break matchEnd9
|
|
83951
|
+
};
|
|
83952
|
+
var x$3 = $m_s_None$();
|
|
83953
|
+
if ((x$3 === x1$2)) {
|
|
83954
|
+
var parent = "self";
|
|
83955
|
+
break matchEnd9
|
|
83956
|
+
};
|
|
83957
|
+
throw new $c_s_MatchError().init___O(x1$2)
|
|
83106
83958
|
};
|
|
83107
83959
|
var x1$3 = $as_Lio_kaitai_struct_format_ClassSpec(x10.classSpec$3.get__O()).meta$1.endian$1;
|
|
83108
83960
|
matchEnd6: {
|
|
83109
83961
|
var addEndian;
|
|
83110
83962
|
if ((x1$3 instanceof $c_s_Some)) {
|
|
83111
83963
|
var x2$3 = $as_s_Some(x1$3);
|
|
83112
|
-
var p3 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
|
|
83113
|
-
var x$
|
|
83114
|
-
if ((x$
|
|
83964
|
+
var p3$2 = $as_Lio_kaitai_struct_datatype_Endianness(x2$3.value$2);
|
|
83965
|
+
var x$5 = $m_Lio_kaitai_struct_datatype_InheritedEndian$();
|
|
83966
|
+
if ((x$5 === p3$2)) {
|
|
83115
83967
|
var addEndian = ", self._is_le";
|
|
83116
83968
|
break matchEnd6
|
|
83117
83969
|
}
|