14 lines
329 B
Rust
14 lines
329 B
Rust
|
use thiserror::Error;
|
||
|
|
||
|
#[derive(Error, Debug)]
|
||
|
pub enum LexerErrors {
|
||
|
#[error("unexpected character {char} at position {pos} in context {context}")]
|
||
|
UnexpectedCharacter {
|
||
|
char: char,
|
||
|
pos: u32,
|
||
|
context: String,
|
||
|
},
|
||
|
#[error("cannot lex an empty text sequence")]
|
||
|
EmptyTextSequenceError,
|
||
|
}
|