Files

16 lines
346 B
Rust

#![allow(dead_code)]
use fix::Evaluator;
use fix_error::{Result, Source};
use fix_lang::Value;
pub fn eval(expr: &str) -> Value {
Evaluator::new()
.eval(Source::new_eval(expr.into()).unwrap())
.unwrap()
}
pub fn eval_result(expr: &str) -> Result<Value> {
Evaluator::new().eval(Source::new_eval(expr.into()).unwrap())
}