eval_expr

Function eval_expr 

Source
pub fn eval_expr(expr: &str) -> Result<Value, String>
Expand description

Eval expression.

ยงExample

assert_eq!(eval_expr("1 + 2 * 3 - 4"), Ok(Value::Integer(3)));