feat: add BuildRunnable::build_module

This commit is contained in:
Shunsuke Shibayama 2023-07-03 01:55:28 +09:00
parent 32a7780581
commit 60f82ba2c1
4 changed files with 21 additions and 1 deletions

View file

@ -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()
}