Begin wrapper rendering

This commit is contained in:
Robin Voetter
2020-06-28 02:50:38 +02:00
parent 45fa195eab
commit 7dfad114ab
4 changed files with 332 additions and 44 deletions

View File

@@ -60,6 +60,7 @@ pub const Container = struct {
name: []const u8,
field_type: TypeInfo,
bits: ?usize,
is_buffer_len: bool,
};
fields: []Field,
@@ -99,6 +100,7 @@ pub const Command = struct {
pub const Param = struct {
name: []const u8,
param_type: TypeInfo,
is_buffer_len: bool,
};
params: []Param,
@@ -108,9 +110,10 @@ pub const Command = struct {
};
pub const Pointer = struct {
pub const PointerSize = enum {
pub const PointerSize = union(enum) {
one,
many, // The length is given by some expression
many, // The length is given by some complex expression, possibly involving another field
other_field: []const u8, // The length is given by some other field or parameter
zero_terminated
};