feat: add erg_compiler::Compiler (python module)

This commit is contained in:
Shunsuke Shibayama 2024-02-15 03:09:22 +09:00
parent 163f4c07f3
commit 4466a5a463
6 changed files with 225 additions and 52 deletions

View file

@ -226,6 +226,11 @@ impl<ASTBuilder: ASTBuildable, HIRBuilder: BuildRunnable> Runnable
// don't initialize the ownership checker
}
fn set_input(&mut self, input: Input) {
self.cfg.input = input;
self.main_builder.set_input(self.cfg.input.clone());
}
fn exec(&mut self) -> Result<ExitStatus, Self::Errs> {
let src = self.cfg_mut().input.read();
let artifact = self