Improved error formatting

This commit is contained in:
2023-03-25 20:47:33 -07:00
parent aca8fa072d
commit 39c52782ca
5 changed files with 69 additions and 15 deletions

View File

@ -129,10 +129,11 @@ fn main() -> Result<(), std::io::Error> {
},
Err((l, e)) => {
write!(
stdout, "{}{}{} {e:?}{}\r\n",
stdout, "{}{}{} {}{}\r\n",
color::Fg(color::Red),
" ".repeat(l.pos + 4),
"^".repeat(l.len),
e.to_message(),
color::Fg(color::Reset),
)?;
}