feat: partially implemented parser
This commit is contained in:
13
src/parser/errors.rs
Normal file
13
src/parser/errors.rs
Normal file
@ -0,0 +1,13 @@
|
||||
use thiserror::Error;
|
||||
use crate::lexer::errors::LexerErrors;
|
||||
use crate::lexer::tokens::Token;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ParserErrors {
|
||||
#[error("unexpected token: {0:?} in procedure {1}")]
|
||||
UnexpectedTokenError(Token, String),
|
||||
#[error("input ended prematurely")]
|
||||
MissingTokenError,
|
||||
#[error("lexer error")]
|
||||
LexerError(#[from] LexerErrors),
|
||||
}
|
Reference in New Issue
Block a user