Add execution test

This commit is contained in:
Shunsuke Shibayama 2022-10-01 01:11:31 +09:00
parent d6e06a02c0
commit 423206920a
11 changed files with 135 additions and 34 deletions

View file

@ -186,10 +186,10 @@ impl Runnable for ParserRunner {
#[inline]
fn clear(&mut self) {}
fn exec(&mut self) -> Result<(), Self::Errs> {
fn exec(&mut self) -> Result<i32, Self::Errs> {
let ast = self.parse(self.input().read())?;
println!("{ast}");
Ok(())
Ok(0)
}
fn eval(&mut self, src: String) -> Result<String, ParserRunnerErrors> {