File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ fn api_matches(node: &Node, expected: &str) -> bool {
48
48
/// Raw representation of Vulkan XML files (`vk.xml`, `video.xml`).
49
49
#[ derive( Debug , Default ) ]
50
50
pub struct Registry {
51
+ pub externals : Vec < External > ,
51
52
pub basetypes : Vec < BaseType > ,
52
53
pub bitmask_types : Vec < BitMaskType > ,
53
54
pub bitmask_aliases : Vec < Alias > ,
@@ -127,6 +128,9 @@ impl Registry {
127
128
Some ( "union" ) => {
128
129
registry. unions . push ( Structure :: from_node ( type_node, api) ) ;
129
130
}
131
+ None => {
132
+ registry. externals . push ( External :: from_node ( type_node) ) ;
133
+ }
130
134
_ => ( ) ,
131
135
}
132
136
}
@@ -213,6 +217,21 @@ impl Alias {
213
217
}
214
218
}
215
219
220
+ #[ derive( Debug ) ]
221
+ pub struct External {
222
+ pub name : XmlStr ,
223
+ pub requires : Option < XmlStr > ,
224
+ }
225
+
226
+ impl External {
227
+ fn from_node ( node : Node ) -> External {
228
+ External {
229
+ name : attribute ( node, "name" ) . unwrap ( ) ,
230
+ requires : attribute ( node, "requires" ) ,
231
+ }
232
+ }
233
+ }
234
+
216
235
#[ derive( Debug ) ]
217
236
pub struct BaseType {
218
237
pub name : XmlStr ,
You can’t perform that action at this time.
0 commit comments