add support for custom theming in mers errors

this also includes support for the NoTheme,
a theme which doesn't add any color to mers'
output.
If you compile mers with --no-default-features,
the `colored` dependency will disappear and
mers_lib will fall back to NoTheme.
This commit is contained in:
Mark
2024-06-26 01:02:19 +02:00
parent f055d2089f
commit a78367f27c
24 changed files with 517 additions and 336 deletions

View File

@@ -24,7 +24,7 @@ fn show(src: String) {
);
eprintln!("{src}");
match parse_compile_check_run(src) {
Err(e) => eprintln!("{e}"),
Err(e) => eprintln!("{e:?}"),
Ok((t, v)) => eprintln!("Returned `{}` :: `{t}`", v.get()),
}
}

View File

@@ -14,7 +14,7 @@ fn main() {
eprintln!("This is not:");
let e = run("5.rust_func".to_owned()).err().unwrap();
eprintln!("{e}");
eprintln!("{e:?}");
}
fn run(src: String) -> Result<(), CheckError> {
let mut source = Source::new_from_string(src);