num_parser 1.0.2

A math interpreter and evaluator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::fmt::Display;

use crate::objects::Request;

impl Display for Request {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Evaluation(_) => write!(f, "evaluation"),
            Self::FuncDeclaration(_, _, _) => write!(f, "function declaration"),
            Self::VarDeclaration(_, _) => write!(f, "variable declaration"),
        }
    }
}