Function eval_expr

Source
pub fn eval_expr(expr: Expr) -> Result<f64, MyError>
Expand description

Evaluate the given expression and return the result.

§Arguments

  • expr - An abstract syntax tree representing the expression to be evaluated.

§Returns

The numerical result of the evaluated expression.