mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
19 lines
502 B
Rust
19 lines
502 B
Rust
use erg_common::traits::Stream;
|
|
|
|
use crate::hir::{Expr, HIR};
|
|
use crate::mod_cache::SharedModuleCache;
|
|
|
|
pub struct Linker {}
|
|
|
|
impl Linker {
|
|
pub fn link(mod_cache: SharedModuleCache) -> HIR {
|
|
let mut main_mod_hir = mod_cache.remove("<module>").unwrap().hir.unwrap();
|
|
for chunk in main_mod_hir.module.iter_mut() {
|
|
match chunk {
|
|
Expr::Def(def) if def.def_kind().is_module() => {}
|
|
_ => {}
|
|
}
|
|
}
|
|
main_mod_hir
|
|
}
|
|
}
|