zen_parser/lexer/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum LexerError {
5    #[error("Unexpected symbol: {symbol}")]
6    UnexpectedSymbol { symbol: String },
7
8    #[error("Unmatched symbol: {symbol} at position {position}")]
9    UnmatchedSymbol { symbol: char, position: usize },
10
11    #[error("Unexpected end of file: {symbol} at position {position}")]
12    UnexpectedEof { symbol: char, position: usize },
13}