sway_core/language/lexed/
mod.rsmod program;
use crate::language::ModName;
pub use program::LexedProgram;
use sway_ast::Module;
use super::{HasModule, HasSubmodules};
#[derive(Debug, Clone)]
pub struct LexedModule {
pub tree: Module,
pub submodules: Vec<(ModName, LexedSubmodule)>,
}
#[derive(Debug, Clone)]
pub struct LexedSubmodule {
pub module: LexedModule,
}
impl HasModule<LexedModule> for LexedSubmodule {
fn module(&self) -> &LexedModule {
&self.module
}
}
impl HasSubmodules<LexedSubmodule> for LexedModule {
fn submodules(&self) -> &[(ModName, LexedSubmodule)] {
&self.submodules
}
}