v0.4.0
Struct As Array Element is Supported!
Now you can embed a struct into a array, like this:
struct TestStructArrayElement {
int32 a[2];
}
struct TestStructArray {
TestStructArrayElement<10> a;
TestStructArrayElement<10> b [order = "big"];
}
Huge Refactor of Generator!
Use text/template
as template engine for easier support of new target language.
Refactor lots of definition for a clearer structure.
-minimal
& -single
generate option are separated from target now, with more generate option added!
Options
-t <target>
: Target language-o <output>
: Output Path-inner
: Generate Inner Class (Nested Struct)-single
: Generate Single File (Combine all definitions into one file, instead of one generated file per source file)-minimal
: Generate Minimal Code (Usually without default getter/setter methods)-decnum
: Force Generate Decimal Format for Constant Value (Translate0xFF
to255
,0b1111
to15
, etc.)-signext
: Sign Extension Method used for Integer Field (Options:shift
,arith
)
Syntax Changes
Method name is no more allowed to be duplicate with another method or field in same struct.
Method name sytle camelCase
is not recommended any more. Use snake_case
instead.