Skip to content

Commit 7dddad9

Browse files
committed
analysis: Add XML parsing support for unions
We can reuse the existing `Structure` parser. Currently, there are no aliases for unions in the XML.
1 parent b3be35c commit 7dddad9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

analysis/src/xml.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub struct Registry {
5858
pub funcpointers: Vec<FuncPointer>,
5959
pub structs: Vec<Structure>,
6060
pub struct_aliases: Vec<Alias>,
61+
pub unions: Vec<Structure>,
6162
pub constants: Vec<Constant>,
6263
pub constant_aliases: Vec<Alias>,
6364
pub enums: Vec<Enum>,
@@ -123,6 +124,9 @@ impl Registry {
123124
Some("struct") => {
124125
registry.structs.push(Structure::from_node(type_node, api))
125126
}
127+
Some("union") => {
128+
registry.unions.push(Structure::from_node(type_node, api));
129+
}
126130
_ => (),
127131
}
128132
}

0 commit comments

Comments
 (0)