mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 01:01:34 +00:00
backend: add const to ast
This commit is contained in:
@ -106,6 +106,7 @@ impl ImportedTypes for ast::ImportKind {
|
||||
ast::ImportKind::Function(fun) => fun.imported_types(f),
|
||||
ast::ImportKind::Type(ty) => ty.imported_types(f),
|
||||
ast::ImportKind::Enum(enm) => enm.imported_types(f),
|
||||
ast::ImportKind::Const(c) => c.imported_types(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -229,6 +230,15 @@ impl ImportedTypes for ast::TypeAlias {
|
||||
}
|
||||
}
|
||||
|
||||
impl ImportedTypes for ast::Const {
|
||||
fn imported_types<F>(&self, f: &mut F)
|
||||
where
|
||||
F: FnMut(&Ident, ImportedTypeKind),
|
||||
{
|
||||
self.ty.imported_types(f);
|
||||
}
|
||||
}
|
||||
|
||||
/// Remove any methods, statics, &c, that reference types that are *not*
|
||||
/// defined.
|
||||
pub trait RemoveUndefinedImports {
|
||||
|
Reference in New Issue
Block a user