Improved error reporting and fully implemented the shopt command

This commit is contained in:
2025-03-26 23:41:19 -04:00
parent 30cd3c0b73
commit 1854578d49
19 changed files with 776 additions and 111 deletions

View File

@@ -77,7 +77,12 @@ pub fn exec_input(input: String) -> ShResult<()> {
let log_tab = read_logic(|l| l.clone());
let input = expand_aliases(input, HashSet::new(), &log_tab);
let mut parser = ParsedSrc::new(Arc::new(input));
parser.parse_src()?;
if let Err(errors) = parser.parse_src() {
for error in errors {
eprintln!("{error}");
}
return Ok(())
}
let mut dispatcher = Dispatcher::new(parser.extract_nodes());
dispatcher.begin_dispatch()