noa_parser/errors.rs
1/// The result of a parse operation
2pub type ParseResult<T> = Result<T, ParseError>;
3
4#[derive(Debug, thiserror::Error)]
5pub enum ParseError {
6 #[error("Unexpected end of input")]
7 UnexpectedEndOfInput,
8 #[error("Unexpected token have been encountered")]
9 UnexpectedToken,
10 #[error("UTF-8 error: {0}")]
11 Utf8Error(#[from] std::str::Utf8Error),
12 #[error("ParseIntError: {0}")]
13 ParseIntError(#[from] std::num::ParseIntError),
14}