summaryrefslogtreecommitdiff
path: root/tests/headers/struct_with_struct.h
diff options
context:
space:
mode:
authorChristopher Chambers <chris.chambers@peanutcode.com>2014-12-19 22:14:59 -0600
committerChristopher Chambers <chris.chambers@peanutcode.com>2014-12-20 21:18:52 -0600
commit01e1e3064f0eb8a188dcd709de4666a6e749afb7 (patch)
tree3477f7a0f95876240631928e65dadeaac1a61f09 /tests/headers/struct_with_struct.h
parent94c75a2e2e398d1d206aaed8146de9c333c4d6ed (diff)
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.
Diffstat (limited to 'tests/headers/struct_with_struct.h')
-rw-r--r--tests/headers/struct_with_struct.h6
1 files changed, 6 insertions, 0 deletions
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;
+};