math_engine/
error.rs

1#[derive(Debug)]
2pub enum ContextError {
3    VariableAlreadyDefined(String, f32),
4    VariableNotFound,
5}
6
7#[derive(Debug)]
8pub enum EvalError {
9    DivisionByZero,
10    IsInfinite,
11    NotANumber,
12    NoContextGiven,
13    VariableNotFound(String),
14}
15
16#[derive(Debug)]
17pub enum ParserError {
18    LexerError,
19    ParserError,
20    NoExpressionFound,
21}