start parsing values incorrectly

This commit is contained in:
nora 2024-04-14 21:37:29 +02:00
parent c4e62f9d2d
commit a7822229f3
8 changed files with 337 additions and 35 deletions

View file

@ -10,3 +10,17 @@ pub struct Diagnostics {
}
pub type DResult<T> = Result<T, Diagnostics>;
impl Diagnostics {
pub fn error_string(msg: String) -> Self {
Self {
errors: vec![msg],
}
}
}
impl<E: std::error::Error + std::fmt::Debug> From<E> for Diagnostics {
fn from(value: E) -> Self {
Self::error_string(format!("{:?}", value))
}
}