pemel 0.2.1

Parsing and Evaluating of Math Expressions Library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::token::Token;
use crate::eval_error::EvalError;

/// Error indicating that the parser encountered an unexpected syntax
#[derive(Debug, Clone, PartialEq)]
pub enum ParseError {
    UnexpectedToken(Token),
    UnexpectedChar(char),
    WrongNumberOfArgs(usize),
    FunctionNotRecognized(String),
    /// Indicates that a derivative was taken with repsect to a non-variable
    DerivativeNotVariable(String),

    /// This error can occur when the parser is evaluating during parsing.
    EvalError(EvalError),
}