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

@@ -1,6 +1,6 @@
[package]
name = "mers_lib"
version = "0.8.13"
version = "0.8.14"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "library to use the mers language in other projects"
@@ -10,9 +10,14 @@ repository = "https://github.com/Dummi26/mers"
[features]
default = ["parse"]
# for parsing and running mers code (for most situations: just enable parse)
parse = ["run"]
run = []
# color features are used when formatting error messages.
ecolor-term = ["dep:colored"]
[dependencies]
colored = "2.0.4"
colored = { version = "2.0.4", optional = true }
line-span = "0.1.5"