From 01e1e3064f0eb8a188dcd709de4666a6e749afb7 Mon Sep 17 00:00:00 2001 From: Christopher Chambers Date: Fri, 19 Dec 2014 22:14:59 -0600 Subject: Adds support for nested structs and unions. parser.rs - Adds detection of nested composite fields so that they can be handled specially during generation (see visit_composite). - Changes to manual recursion through Clang's cursors so that top-level and nested composites can be handled separately. gen.rs - Improves generation for nested composite types. - Unifies handling of structs and unions somewhat. types.rs - Adds CompKind to distinguish between structs and unions. - Updates CompInfo to use CompKind rather than a bool. --- tests/headers/struct_with_struct.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/headers/struct_with_struct.h (limited to 'tests/headers/struct_with_struct.h') diff --git a/tests/headers/struct_with_struct.h b/tests/headers/struct_with_struct.h new file mode 100644 index 00000000..78b1cc81 --- /dev/null +++ b/tests/headers/struct_with_struct.h @@ -0,0 +1,6 @@ +struct foo { + struct { + unsigned int x; + unsigned int y; + } bar; +}; -- cgit v1.2.3