chore(parser): return AST and Warnings

This commit is contained in:
Shunsuke Shibayama 2023-06-09 02:36:41 +09:00
parent d4b78eb020
commit 324618dbdc
21 changed files with 443 additions and 128 deletions

View file

@ -249,6 +249,10 @@ pub trait Stream<T>: Sized {
{
self.ref_mut_payload().extend(iter);
}
fn split_off(&mut self, at: usize) -> Vec<T> {
self.ref_mut_payload().split_off(at)
}
}
#[macro_export]
@ -792,7 +796,7 @@ pub trait Runnable: Sized + Default {
instance.quit_successfully(output);
}
num_errors += errs.len();
errs.fmt_all_stderr();
errs.write_all_stderr();
}
}
instance.input().set_block_begin();
@ -916,7 +920,7 @@ pub trait Runnable: Sized + Default {
return ExitStatus::new(0, 0, num_errors);
}
num_errors += errs.len();
errs.fmt_all_stderr();
errs.write_all_stderr();
}
}
instance.input().set_block_begin();
@ -931,7 +935,7 @@ pub trait Runnable: Sized + Default {
Ok(status) => status,
Err(errs) => {
num_errors += errs.len();
errs.fmt_all_stderr();
errs.write_all_stderr();
ExitStatus::new(1, 0, num_errors)
}
}