mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 01:01:34 +00:00
webidl: initial enum support
Add enum support to the WebIDL interface generator.
This commit is contained in:
@ -105,6 +105,7 @@ impl ImportedTypes for ast::ImportKind {
|
||||
ast::ImportKind::Static(s) => s.imported_types(f),
|
||||
ast::ImportKind::Function(fun) => fun.imported_types(f),
|
||||
ast::ImportKind::Type(ty) => ty.imported_types(f),
|
||||
ast::ImportKind::Enum(enm) => enm.imported_types(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -210,6 +211,15 @@ impl ImportedTypes for ast::ImportType {
|
||||
}
|
||||
}
|
||||
|
||||
impl ImportedTypes for ast::ImportEnum {
|
||||
fn imported_types<F>(&self, f: &mut F)
|
||||
where
|
||||
F: FnMut(&Ident, ImportedTypeKind),
|
||||
{
|
||||
f(&self.name, ImportedTypeKind::Definition);
|
||||
}
|
||||
}
|
||||
|
||||
impl ImportedTypes for ast::TypeAlias {
|
||||
fn imported_types<F>(&self, f: &mut F)
|
||||
where
|
||||
|
Reference in New Issue
Block a user