pub fn eval(code: &str, ctx: &Context) -> Result<Value>
Expand description
Compile and run an expr program in one step, using the default environment.
Example:
use expr::{Context, eval};
let ctx = Context::default();
assert_eq!(eval("1 + 2", &ctx).unwrap().to_string(), "3");