mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-03 05:54:33 +00:00
feat: add BuildRunnable::build_module
This commit is contained in:
parent
32a7780581
commit
60f82ba2c1
4 changed files with 21 additions and 1 deletions
|
@ -179,6 +179,11 @@ impl HIRBuilder {
|
|||
self.check(artifact.ast, mode)
|
||||
}
|
||||
|
||||
pub fn build_module(&mut self) -> Result<CompleteArtifact, IncompleteArtifact> {
|
||||
let src = self.cfg_mut().input.read();
|
||||
self.build(src, "exec")
|
||||
}
|
||||
|
||||
pub fn pop_mod_ctx(&mut self) -> Option<ModuleContext> {
|
||||
self.lowerer.pop_mod_ctx()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue