kaitai-struct-compiler 0.11.0-SNAPSHOT20240415.175433.32227fc → 0.11.0-SNAPSHOT20240610.172038.27d5020
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kaitai-struct-compiler.js +91 -72
- package/package.json +1 -1
|
@@ -2364,42 +2364,10 @@ $c_Lio_kaitai_struct_Main$.prototype.precompile__Lio_kaitai_struct_format_ClassS
|
|
|
2364
2364
|
var typeValidatorProblems = new $c_Lio_kaitai_struct_precompile_TypeValidator(specs).run__sc_Iterable();
|
|
2365
2365
|
var styleWarnings = new $c_Lio_kaitai_struct_precompile_StyleCheckIds(specs).run__sc_Iterable();
|
|
2366
2366
|
var encodingProblems = new $c_Lio_kaitai_struct_precompile_CanonicalizeEncodingNames(specs).run__sc_Iterable();
|
|
2367
|
-
var this$4 = $n(
|
|
2368
|
-
var
|
|
2369
|
-
var
|
|
2370
|
-
|
|
2371
|
-
var n = $n(this$4.scm_HashMap__f_scala$collection$mutable$HashMap$$table).get(i);
|
|
2372
|
-
if ((n !== null)) {
|
|
2373
|
-
var this$5 = $n(n);
|
|
2374
|
-
var _$this = this$5;
|
|
2375
|
-
while (true) {
|
|
2376
|
-
var _1 = $n(_$this).scm_HashMap$Node__f__key;
|
|
2377
|
-
var _2 = $n(_$this).scm_HashMap$Node__f__value;
|
|
2378
|
-
$as_T(_1);
|
|
2379
|
-
var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(_2);
|
|
2380
|
-
try {
|
|
2381
|
-
$n(typeSpec).Lio_kaitai_struct_format_ClassSpec__f_parentClass = $m_Lio_kaitai_struct_format_GenericStructClassSpec$()
|
|
2382
|
-
} catch (e) {
|
|
2383
|
-
if ((e instanceof $c_Lio_kaitai_struct_problems_CompilationProblemException)) {
|
|
2384
|
-
var cpe = $as_Lio_kaitai_struct_problems_CompilationProblemException(e);
|
|
2385
|
-
throw $n($n(cpe).localizedInType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_problems_CompilationProblemException(typeSpec))
|
|
2386
|
-
} else {
|
|
2387
|
-
throw e
|
|
2388
|
-
}
|
|
2389
|
-
};
|
|
2390
|
-
if (($n(_$this).scm_HashMap$Node__f__next !== null)) {
|
|
2391
|
-
_$this = $n(_$this).scm_HashMap$Node__f__next;
|
|
2392
|
-
continue
|
|
2393
|
-
};
|
|
2394
|
-
break
|
|
2395
|
-
}
|
|
2396
|
-
};
|
|
2397
|
-
i = ((1 + i) | 0)
|
|
2398
|
-
};
|
|
2399
|
-
var this$6 = $n(resolveTypeProblems);
|
|
2400
|
-
var this$7 = $n($as_sc_IterableOps(this$6.concat__sc_IterableOnce__O(typeValidatorProblems)));
|
|
2401
|
-
var this$8 = $n($as_sc_IterableOps(this$7.concat__sc_IterableOnce__O(styleWarnings)));
|
|
2402
|
-
return $as_sc_Iterable(this$8.concat__sc_IterableOnce__O(encodingProblems))
|
|
2367
|
+
var this$4 = $n(resolveTypeProblems);
|
|
2368
|
+
var this$5 = $n($as_sc_IterableOps(this$4.concat__sc_IterableOnce__O(typeValidatorProblems)));
|
|
2369
|
+
var this$6 = $n($as_sc_IterableOps(this$5.concat__sc_IterableOnce__O(styleWarnings)));
|
|
2370
|
+
return $as_sc_Iterable(this$6.concat__sc_IterableOnce__O(encodingProblems))
|
|
2403
2371
|
});
|
|
2404
2372
|
$c_Lio_kaitai_struct_Main$.prototype.compile__Lio_kaitai_struct_format_ClassSpecs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_languages_components_LanguageCompilerStatic__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_CompileLog$SpecSuccess = (function(specs, spec, lang, conf) {
|
|
2405
2373
|
var config = $p_Lio_kaitai_struct_Main$__updateConfigFromMeta__Lio_kaitai_struct_RuntimeConfig__Lio_kaitai_struct_format_MetaSpec__Lio_kaitai_struct_RuntimeConfig(this, conf, $n(spec).Lio_kaitai_struct_format_ClassSpec__f_meta);
|
|
@@ -3044,8 +3012,8 @@ function $m_Lio_kaitai_struct_Utils$() {
|
|
|
3044
3012
|
function $c_Lio_kaitai_struct_Version$() {
|
|
3045
3013
|
this.Lio_kaitai_struct_Version$__f_version = null;
|
|
3046
3014
|
this.Lio_kaitai_struct_Version$__f_gitTime = null;
|
|
3047
|
-
this.Lio_kaitai_struct_Version$__f_version = "0.11-
|
|
3048
|
-
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-
|
|
3015
|
+
this.Lio_kaitai_struct_Version$__f_version = "0.11-SNAPSHOT20240610.172038.27d5020";
|
|
3016
|
+
this.Lio_kaitai_struct_Version$__f_gitTime = "2024-06-10T17:20:38Z"
|
|
3049
3017
|
}
|
|
3050
3018
|
$c_Lio_kaitai_struct_Version$.prototype = new $h_O();
|
|
3051
3019
|
$c_Lio_kaitai_struct_Version$.prototype.constructor = $c_Lio_kaitai_struct_Version$;
|
|
@@ -19207,10 +19175,9 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19207
19175
|
var x3 = null;
|
|
19208
19176
|
var x1$2 = $n(x2).Lio_kaitai_struct_datatype_DataType$UserType__f_forcedParent;
|
|
19209
19177
|
matchEnd9: {
|
|
19210
|
-
var this$1;
|
|
19211
19178
|
var x = $m_s_None$();
|
|
19212
19179
|
if ((x === x1$2)) {
|
|
19213
|
-
|
|
19180
|
+
$thiz.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V(curClass, x2);
|
|
19214
19181
|
break matchEnd9
|
|
19215
19182
|
};
|
|
19216
19183
|
if ((x1$2 instanceof $c_s_Some)) {
|
|
@@ -19220,7 +19187,6 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19220
19187
|
var x$3 = $m_Lio_kaitai_struct_datatype_DataType$().Lio_kaitai_struct_datatype_DataType$__f_USER_TYPE_NO_PARENT;
|
|
19221
19188
|
if (((x$3 === null) ? (p4 === null) : $n(x$3).equals__O__Z(p4))) {
|
|
19222
19189
|
$n($m_Lio_kaitai_struct_Log$().Lio_kaitai_struct_Log$__f_typeProcParent);
|
|
19223
|
-
var this$1 = $m_s_None$();
|
|
19224
19190
|
break matchEnd9
|
|
19225
19191
|
}
|
|
19226
19192
|
};
|
|
@@ -19230,23 +19196,19 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19230
19196
|
var detector = $ct_Lio_kaitai_struct_translators_TypeDetector__Lio_kaitai_struct_translators_TypeProvider__(new $c_Lio_kaitai_struct_translators_TypeDetector(), provider);
|
|
19231
19197
|
var parentType = detector.detectType__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType(parent);
|
|
19232
19198
|
$n($m_Lio_kaitai_struct_Log$().Lio_kaitai_struct_Log$__f_typeProcParent);
|
|
19233
|
-
if ((
|
|
19199
|
+
if ((parentType instanceof $c_Lio_kaitai_struct_datatype_DataType$UserType)) {
|
|
19200
|
+
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(parentType);
|
|
19201
|
+
$thiz.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V($as_Lio_kaitai_struct_format_ClassSpec($n($n(x2$2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O()), x2)
|
|
19202
|
+
} else {
|
|
19234
19203
|
throw new $c_Lio_kaitai_struct_precompile_TypeMismatchError((((("parent=" + parent) + " is expected to be either of user type or `false`, but ") + parentType) + " found"))
|
|
19235
19204
|
};
|
|
19236
|
-
var x2$2 = $as_Lio_kaitai_struct_datatype_DataType$UserType(parentType);
|
|
19237
|
-
var this$1 = new $c_s_Some($n($n(x2$2).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec).get__O());
|
|
19238
19205
|
break matchEnd9
|
|
19239
19206
|
};
|
|
19240
19207
|
throw new $c_s_MatchError(x1$2)
|
|
19241
|
-
};
|
|
19242
|
-
if ((!this$1.isEmpty__Z())) {
|
|
19243
|
-
var arg1 = this$1.get__O();
|
|
19244
|
-
var parentClass = $as_Lio_kaitai_struct_format_ClassSpec(arg1);
|
|
19245
|
-
$thiz.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V(parentClass, x2)
|
|
19246
19208
|
}
|
|
19247
19209
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
19248
19210
|
var x3$2 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
19249
|
-
var this$
|
|
19211
|
+
var this$1 = $n($n(x3$2).Lio_kaitai_struct_datatype_DataType$SwitchType__f_cases);
|
|
19250
19212
|
var f = new $c_sjsr_AnonFunction1(((curClass) => ((x0$1$2) => {
|
|
19251
19213
|
var x0$1 = $as_T2(x0$1$2);
|
|
19252
19214
|
matchEnd7: {
|
|
@@ -19264,11 +19226,11 @@ function $p_Lio_kaitai_struct_precompile_ParentTypes__markupParentTypesAdd__Lio_
|
|
|
19264
19226
|
throw new $c_s_MatchError(x0$1)
|
|
19265
19227
|
}
|
|
19266
19228
|
}))(curClass));
|
|
19267
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$
|
|
19229
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$1.sci_TreeMap__f_tree, f)
|
|
19268
19230
|
} else if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream)) {
|
|
19269
19231
|
var x4 = $as_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(x1);
|
|
19270
|
-
var this$
|
|
19271
|
-
var innerType = this$
|
|
19232
|
+
var this$2 = $n(x4);
|
|
19233
|
+
var innerType = this$2.Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType;
|
|
19272
19234
|
dt = innerType;
|
|
19273
19235
|
continue
|
|
19274
19236
|
};
|
|
@@ -19309,6 +19271,38 @@ $c_Lio_kaitai_struct_precompile_ParentTypes.prototype.run__V = (function() {
|
|
|
19309
19271
|
}
|
|
19310
19272
|
};
|
|
19311
19273
|
i = ((1 + i) | 0)
|
|
19274
|
+
};
|
|
19275
|
+
var this$3 = $n(this.Lio_kaitai_struct_precompile_ParentTypes__f_classSpecs);
|
|
19276
|
+
var len$1 = $n(this$3.scm_HashMap__f_scala$collection$mutable$HashMap$$table).u.length;
|
|
19277
|
+
var i$1 = 0;
|
|
19278
|
+
while ((i$1 < len$1)) {
|
|
19279
|
+
var n$1 = $n(this$3.scm_HashMap__f_scala$collection$mutable$HashMap$$table).get(i$1);
|
|
19280
|
+
if ((n$1 !== null)) {
|
|
19281
|
+
var this$4 = $n(n$1);
|
|
19282
|
+
var _$this$1 = this$4;
|
|
19283
|
+
while (true) {
|
|
19284
|
+
var _1$1 = $n(_$this$1).scm_HashMap$Node__f__key;
|
|
19285
|
+
var _2$1 = $n(_$this$1).scm_HashMap$Node__f__value;
|
|
19286
|
+
$as_T(_1$1);
|
|
19287
|
+
var typeSpec = $as_Lio_kaitai_struct_format_ClassSpec(_2$1);
|
|
19288
|
+
try {
|
|
19289
|
+
$n(typeSpec).Lio_kaitai_struct_format_ClassSpec__f_parentClass = $m_Lio_kaitai_struct_format_GenericStructClassSpec$()
|
|
19290
|
+
} catch (e) {
|
|
19291
|
+
if ((e instanceof $c_Lio_kaitai_struct_problems_CompilationProblemException)) {
|
|
19292
|
+
var cpe = $as_Lio_kaitai_struct_problems_CompilationProblemException(e);
|
|
19293
|
+
throw $n($n(cpe).localizedInType__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_problems_CompilationProblemException(typeSpec))
|
|
19294
|
+
} else {
|
|
19295
|
+
throw e
|
|
19296
|
+
}
|
|
19297
|
+
};
|
|
19298
|
+
if (($n(_$this$1).scm_HashMap$Node__f__next !== null)) {
|
|
19299
|
+
_$this$1 = $n(_$this$1).scm_HashMap$Node__f__next;
|
|
19300
|
+
continue
|
|
19301
|
+
};
|
|
19302
|
+
break
|
|
19303
|
+
}
|
|
19304
|
+
};
|
|
19305
|
+
i$1 = ((1 + i$1) | 0)
|
|
19312
19306
|
}
|
|
19313
19307
|
});
|
|
19314
19308
|
$c_Lio_kaitai_struct_precompile_ParentTypes.prototype.markup__Lio_kaitai_struct_format_ClassSpec__V = (function(curClass) {
|
|
@@ -19345,7 +19339,26 @@ $c_Lio_kaitai_struct_precompile_ParentTypes.prototype.markup__Lio_kaitai_struct_
|
|
|
19345
19339
|
throw new $c_s_MatchError(x0$1)
|
|
19346
19340
|
}
|
|
19347
19341
|
}));
|
|
19348
|
-
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f)
|
|
19342
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$6.sci_TreeMap__f_tree, f);
|
|
19343
|
+
var this$7 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
19344
|
+
if ((!this$7.isEmpty__Z())) {
|
|
19345
|
+
$n($m_Lio_kaitai_struct_Log$().Lio_kaitai_struct_Log$__f_typeProcParent)
|
|
19346
|
+
};
|
|
19347
|
+
var this$8 = $n($n(curClass).Lio_kaitai_struct_format_ClassSpec__f_types);
|
|
19348
|
+
var f$1 = new $c_sjsr_AnonFunction1(((x0$2$2) => {
|
|
19349
|
+
var x0$2 = $as_T2(x0$2$2);
|
|
19350
|
+
if ((x0$2 !== null)) {
|
|
19351
|
+
var ty = $as_Lio_kaitai_struct_format_ClassSpec($n(x0$2).T2__f__2);
|
|
19352
|
+
var x = $n(ty).Lio_kaitai_struct_format_ClassSpec__f_parentClass;
|
|
19353
|
+
var x$2 = $m_Lio_kaitai_struct_format_UnknownClassSpec$();
|
|
19354
|
+
if (((x !== null) && $n(x).equals__O__Z(x$2))) {
|
|
19355
|
+
this.markup__Lio_kaitai_struct_format_ClassSpec__V(ty)
|
|
19356
|
+
}
|
|
19357
|
+
} else {
|
|
19358
|
+
throw new $c_s_MatchError(x0$2)
|
|
19359
|
+
}
|
|
19360
|
+
}));
|
|
19361
|
+
$m_sci_RedBlackTree$().foreach__sci_RedBlackTree$Tree__F1__V(this$8.sci_TreeMap__f_tree, f$1)
|
|
19349
19362
|
});
|
|
19350
19363
|
$c_Lio_kaitai_struct_precompile_ParentTypes.prototype.markupParentAs__Lio_kaitai_struct_format_ClassSpec__Lio_kaitai_struct_datatype_DataType$UserType__V = (function(curClass, ut) {
|
|
19351
19364
|
var x1 = $n(ut).Lio_kaitai_struct_datatype_DataType$UserType__f_classSpec;
|
|
@@ -62550,7 +62563,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.publicMemberName__Lio_k
|
|
|
62550
62563
|
throw new $c_s_MatchError(id)
|
|
62551
62564
|
}
|
|
62552
62565
|
});
|
|
62553
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.
|
|
62566
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T = (function(importList, attrType) {
|
|
62554
62567
|
while (true) {
|
|
62555
62568
|
var rc72 = false;
|
|
62556
62569
|
var x2 = null;
|
|
@@ -62718,7 +62731,9 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeType__
|
|
|
62718
62731
|
};
|
|
62719
62732
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$ArrayType)) {
|
|
62720
62733
|
var x69 = $as_Lio_kaitai_struct_datatype_DataType$ArrayType(x1);
|
|
62721
|
-
|
|
62734
|
+
var this$1 = $n(importList);
|
|
62735
|
+
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System.Collections.Generic");
|
|
62736
|
+
return (("List<" + this.kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(importList, $n(x69).Lio_kaitai_struct_datatype_DataType$ArrayType__f_elType)) + ">")
|
|
62722
62737
|
};
|
|
62723
62738
|
if ((x1 instanceof $c_Lio_kaitai_struct_datatype_DataType$SwitchType)) {
|
|
62724
62739
|
var x70 = $as_Lio_kaitai_struct_datatype_DataType$SwitchType(x1);
|
|
@@ -62728,8 +62743,8 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeType__
|
|
|
62728
62743
|
throw new $c_s_MatchError(x1)
|
|
62729
62744
|
}
|
|
62730
62745
|
});
|
|
62731
|
-
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.
|
|
62732
|
-
var r = this.
|
|
62746
|
+
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T = (function(importList, t, isNullable) {
|
|
62747
|
+
var r = this.kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(importList, t);
|
|
62733
62748
|
return (isNullable ? (((t instanceof $c_Lio_kaitai_struct_datatype_DataType$NumericType) || (t instanceof $c_Lio_kaitai_struct_datatype_DataType$BooleanType)) ? (r + "?") : r) : r)
|
|
62734
62749
|
});
|
|
62735
62750
|
$c_Lio_kaitai_struct_languages_CSharpCompiler$.prototype.types2class__sc_Iterable__T = (function(names) {
|
|
@@ -85454,7 +85469,7 @@ function $h_Lio_kaitai_struct_translators_CSharpTranslator() {
|
|
|
85454
85469
|
}
|
|
85455
85470
|
$h_Lio_kaitai_struct_translators_CSharpTranslator.prototype = $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype;
|
|
85456
85471
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doArrayLiteral__Lio_kaitai_struct_datatype_DataType__sci_Seq__T = (function(t, value) {
|
|
85457
|
-
var nativeType = $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
85472
|
+
var nativeType = $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList, t);
|
|
85458
85473
|
var this$2 = $n($as_sc_IterableOnceOps($n(value).map__F1__O(new $c_sjsr_AnonFunction1(((v$2) => {
|
|
85459
85474
|
var v = $as_Lio_kaitai_struct_exprlang_Ast$expr(v$2);
|
|
85460
85475
|
return this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(v, 0)
|
|
@@ -85559,7 +85574,7 @@ $c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doIfExp__Lio_kaitai_
|
|
|
85559
85574
|
return (((((("(" + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(condition, 0)) + " ? ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifTrue, 0)) + " : ") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(ifFalse, 0)) + ")")
|
|
85560
85575
|
});
|
|
85561
85576
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.doCast__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_datatype_DataType__T = (function(value, typeName) {
|
|
85562
|
-
return (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
85577
|
+
return (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList, typeName)) + ") (") + this.translate__Lio_kaitai_struct_exprlang_Ast$expr__I__T(value, 0)) + "))")
|
|
85563
85578
|
});
|
|
85564
85579
|
$c_Lio_kaitai_struct_translators_CSharpTranslator.prototype.strToInt__Lio_kaitai_struct_exprlang_Ast$expr__Lio_kaitai_struct_exprlang_Ast$expr__T = (function(s, base) {
|
|
85565
85580
|
var this$1 = $n(this.Lio_kaitai_struct_translators_CSharpTranslator__f_importList);
|
|
@@ -96716,7 +96731,8 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
96716
96731
|
var this$2 = $n(params);
|
|
96717
96732
|
var f = ((p$2) => {
|
|
96718
96733
|
var p = $as_Lio_kaitai_struct_format_ParamDefSpec(p$2);
|
|
96719
|
-
|
|
96734
|
+
var attrType = $n(p).Lio_kaitai_struct_format_ParamDefSpec__f_dataType;
|
|
96735
|
+
return (($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType) + " ") + this.paramName__Lio_kaitai_struct_format_Identifier__T($n(p).Lio_kaitai_struct_format_ParamDefSpec__f_id))
|
|
96720
96736
|
});
|
|
96721
96737
|
if ((this$2 === $m_sci_Nil$())) {
|
|
96722
96738
|
var $$x2 = $m_sci_Nil$()
|
|
@@ -96735,7 +96751,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.classConstructorHeader__
|
|
|
96735
96751
|
var $$x2 = h
|
|
96736
96752
|
};
|
|
96737
96753
|
var paramsArg = $n($$x3).join__sc_IterableOnce__T__T__T__T($$x2, "", ", ", ", ");
|
|
96738
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((((((("public " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(") + paramsArg) + ("KaitaiStream " + pIo)) + ", ") + (($m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96754
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((((((("public " + $m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(name)) + "(") + paramsArg) + ("KaitaiStream " + pIo)) + ", ") + (($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, parentType) + " ") + pParent)) + " = null, ") + (((((($m_Lio_kaitai_struct_Utils$().upperCamelCase__T__T(rootClassName) + " ") + pRoot) + " = null") + addEndian) + ") : base(") + pIo)) + ")"));
|
|
96739
96755
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
96740
96756
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96741
96757
|
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V($m_Lio_kaitai_struct_format_ParentIdentifier$(), pParent);
|
|
@@ -96803,10 +96819,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.readFooter__V = (functio
|
|
|
96803
96819
|
this.fileFooter__T__V("")
|
|
96804
96820
|
});
|
|
96805
96821
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeDeclaration__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
96806
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96822
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
96807
96823
|
});
|
|
96808
96824
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.attributeReader__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
96809
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96825
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + " { get { return ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + "; } }"))
|
|
96810
96826
|
});
|
|
96811
96827
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.universalDoc__Lio_kaitai_struct_format_DocSpec__V = (function(doc) {
|
|
96812
96828
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
@@ -96938,7 +96954,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condIfFooter__Lio_kaitai
|
|
|
96938
96954
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatInitAttr__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType) {
|
|
96939
96955
|
var this$1 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList);
|
|
96940
96956
|
$m_Lio_kaitai_struct_Utils$().addUniqueAttr__scm_ListBuffer__O__V(this$1.Lio_kaitai_struct_ImportList__f_list, "System.Collections.Generic");
|
|
96941
|
-
|
|
96957
|
+
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
96958
|
+
var $$x1 = this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id);
|
|
96959
|
+
var attrType = new $c_Lio_kaitai_struct_datatype_DataType$ArrayTypeInStream(dataType);
|
|
96960
|
+
$n($$x2).puts__T__V(((($$x1 + " = new ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType)) + "();"))
|
|
96942
96961
|
});
|
|
96943
96962
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatEosHeader__Lio_kaitai_struct_format_Identifier__T__Lio_kaitai_struct_datatype_DataType__V = (function(id, io, dataType) {
|
|
96944
96963
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
@@ -96972,7 +96991,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.condRepeatUntilHeader__L
|
|
|
96972
96991
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
96973
96992
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
96974
96993
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("var i = 0;");
|
|
96975
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
96994
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType) + " ") + $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_translator).doName__T__T("_")) + ";"));
|
|
96976
96995
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("do {");
|
|
96977
96996
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V()
|
|
96978
96997
|
});
|
|
@@ -97003,7 +97022,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentSimple__
|
|
|
97003
97022
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(id) + " = ") + expr) + ";"))
|
|
97004
97023
|
});
|
|
97005
97024
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.handleAssignmentTempVar__Lio_kaitai_struct_datatype_DataType__T__T__V = (function(dataType, id, expr) {
|
|
97006
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((($m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97025
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((((($m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType) + " ") + id) + " = ") + expr) + ";"))
|
|
97007
97026
|
});
|
|
97008
97027
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.blockScopeHeader__V = (function() {
|
|
97009
97028
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
@@ -97124,7 +97143,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.bytesPadTermExpr__T__s_O
|
|
|
97124
97143
|
return expr2
|
|
97125
97144
|
});
|
|
97126
97145
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.userTypeDebugRead__T__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_datatype_DataType__V = (function(id, dataType, assignType) {
|
|
97127
|
-
var expr = ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType))) ? (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97146
|
+
var expr = ((!((assignType === null) ? (dataType === null) : $n(assignType).equals__O__Z(dataType))) ? (((("((" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType)) + ") (") + id) + "))") : id);
|
|
97128
97147
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((expr + "._read();"))
|
|
97129
97148
|
});
|
|
97130
97149
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchRequiresIfs__Lio_kaitai_struct_datatype_DataType__Z = (function(onType) {
|
|
@@ -97156,7 +97175,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfStart__Lio_kaita
|
|
|
97156
97175
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
97157
97176
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
97158
97177
|
var $$x2 = $n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out);
|
|
97159
|
-
var $$x1 = $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97178
|
+
var $$x1 = $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, onType);
|
|
97160
97179
|
var e = this.Lio_kaitai_struct_languages_CSharpCompiler__f_NAME_SWITCH_ON;
|
|
97161
97180
|
$n($$x2).puts__T__V(((((($$x1 + " ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, e)) + " = ") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, on)) + ";"))
|
|
97162
97181
|
});
|
|
@@ -97189,10 +97208,10 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.switchIfEnd__V = (functi
|
|
|
97189
97208
|
});
|
|
97190
97209
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceDeclaration__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(attrName, attrType, isNullable) {
|
|
97191
97210
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("private bool " + this.flagForInstName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"));
|
|
97192
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97211
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((((("private " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, attrType, isNullable)) + " ") + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(attrName)) + ";"))
|
|
97193
97212
|
});
|
|
97194
97213
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceHeader__T__Lio_kaitai_struct_format_InstanceIdentifier__Lio_kaitai_struct_datatype_DataType__Z__V = (function(className, instName, dataType, isNullable) {
|
|
97195
|
-
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97214
|
+
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V(((("public " + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeTypeNullable__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__Z__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType, isNullable)) + " ") + $m_Lio_kaitai_struct_languages_CSharpCompiler$().publicMemberName__Lio_kaitai_struct_format_Identifier__T(instName)));
|
|
97196
97215
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("{");
|
|
97197
97216
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).inc__V();
|
|
97198
97217
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V("get");
|
|
@@ -97215,7 +97234,7 @@ $c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceReturn__Lio_kait
|
|
|
97215
97234
|
$n(this.Lio_kaitai_struct_languages_CSharpCompiler__f_out).puts__T__V((("return " + this.privateMemberName__Lio_kaitai_struct_format_Identifier__T(instName)) + ";"))
|
|
97216
97235
|
});
|
|
97217
97236
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.instanceCalculate__Lio_kaitai_struct_format_Identifier__Lio_kaitai_struct_datatype_DataType__Lio_kaitai_struct_exprlang_Ast$expr__V = (function(instName, dataType, value) {
|
|
97218
|
-
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, (((("(" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().
|
|
97237
|
+
this.handleAssignmentSimple__Lio_kaitai_struct_format_Identifier__T__V(instName, (((("(" + $m_Lio_kaitai_struct_languages_CSharpCompiler$().kaitaiType2NativeType__Lio_kaitai_struct_ImportList__Lio_kaitai_struct_datatype_DataType__T(this.Lio_kaitai_struct_languages_CSharpCompiler__f_importList, dataType)) + ") (") + $f_Lio_kaitai_struct_languages_components_ObjectOrientedLanguage__expression__Lio_kaitai_struct_exprlang_Ast$expr__T(this, value)) + ")"))
|
|
97219
97238
|
});
|
|
97220
97239
|
$c_Lio_kaitai_struct_languages_CSharpCompiler.prototype.flagForInstName__Lio_kaitai_struct_format_Identifier__T = (function(ksName) {
|
|
97221
97240
|
return ("f_" + this.idToStr__Lio_kaitai_struct_format_Identifier__T(ksName))
|
package/package.json
CHANGED