halp, i cant write a recursive iterator :3

This commit is contained in:
🪞👃🪞 2025-01-05 03:29:27 +01:00
parent f3fd88a199
commit 140fd22223
10 changed files with 107 additions and 99 deletions

20
edn/src/edn_error.rs Normal file
View file

@ -0,0 +1,20 @@
use crate::*;
#[derive(Debug)]
pub enum ParseError {
Unknown(u8),
Empty,
Incomplete,
Unexpected(char),
}
impl std::fmt::Display for ParseError {
fn fmt (&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Empty => write!(f, "empty"),
Self::Incomplete => write!(f, "incomplete"),
Self::Unexpected(c) => write!(f, "unexpected '{c}'"),
Self::Unknown(i) => write!(f, "unknown #{i}"),
}
}
}
impl std::error::Error for ParseError {}