mod index;
mod items;
mod resolver;
use miden_debug_types::Spanned;
pub use self::{
index::{GlobalItemIndex, ItemIndex, ModuleIndex},
items::Item,
resolver::{
LocalSymbol, LocalSymbolResolver, SymbolResolution, SymbolResolutionError, SymbolTable,
},
};
use super::{Ident, Import, Visibility};
#[derive(Debug, Copy, Clone)]
pub enum Declaration<'a> {
Item(&'a Item),
Import(&'a Import),
Submodule(&'a SubmoduleDecl),
}
impl Spanned for Declaration<'_> {
fn span(&self) -> miden_debug_types::SourceSpan {
match self {
Self::Item(item) => item.span(),
Self::Import(import) => import.local_name().span(),
Self::Submodule(decl) => decl.name.span(),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SubmoduleDecl {
pub visibility: Visibility,
pub name: Ident,
}