Update ErgConfig and Runnable

This commit is contained in:
Shunsuke Shibayama 2022-09-16 02:21:04 +09:00
parent d7ffb211a8
commit d2ad7caaab
8 changed files with 42 additions and 26 deletions

View file

@ -116,8 +116,8 @@ impl Runnable for Compiler {
}
#[inline]
fn input(&self) -> &Input {
&self.cfg.input
fn cfg(&self) -> &ErgConfig {
&self.cfg
}
#[inline]

View file

@ -41,6 +41,11 @@ impl Runnable for ASTLowererRunner {
type Errs = CompileErrors;
const NAME: &'static str = "Erg lowerer";
#[inline]
fn cfg(&self) -> &ErgConfig {
&self.cfg
}
fn new(cfg: ErgConfig) -> Self {
Self {
cfg,
@ -48,11 +53,6 @@ impl Runnable for ASTLowererRunner {
}
}
#[inline]
fn input(&self) -> &Input {
&self.cfg.input
}
#[inline]
fn finish(&mut self) {}