Skip to content

Commit

Permalink
rewrite: Add support for unions
Browse files Browse the repository at this point in the history
We can reuse the existing `Structure` parser. Currently, there are no
aliases for unions in the XML.
  • Loading branch information
Friz64 committed Apr 20, 2023
1 parent 9578ee3 commit a8a5c42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions analysis/src/xml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pub struct Registry {
pub funcpointers: Vec<FuncPointer>,
pub structs: Vec<Structure>,
pub struct_aliases: Vec<Alias>,
pub unions: Vec<Structure>,
pub constants: Vec<Constant>,
pub constant_aliases: Vec<Alias>,
pub enums: Vec<Enum>,
Expand Down Expand Up @@ -123,6 +124,9 @@ impl Registry {
Some("struct") => {
registry.structs.push(Structure::from_node(type_node, api))
}
Some("union") => {
registry.unions.push(Structure::from_node(type_node, api));
}
_ => (),
}
}
Expand Down

0 comments on commit a8a5c42

Please sign in to comment.