mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 04:09:05 +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
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue