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

@ -239,6 +239,11 @@ impl Compiler {
Ok(CompleteArtifact::new(codeobj, arti.warns))
}
pub fn compile_module(&mut self) -> Result<CompleteArtifact<CodeObj>, ErrorArtifact> {
let src = self.cfg.input.read();
self.compile(src, "exec")
}
pub fn eval_compile(
&mut self,
src: String,