39 lines
871 B
Rust
39 lines
871 B
Rust
#![allow(dead_code)]
|
|
|
|
use fix::error::{Result, Source};
|
|
use fix::runtime::Runtime;
|
|
use fix::value::Value;
|
|
|
|
pub fn eval(expr: &str) -> Value {
|
|
Runtime::new()
|
|
.unwrap()
|
|
.eval(Source::new_eval(expr.into()).unwrap())
|
|
.unwrap()
|
|
}
|
|
|
|
pub fn eval_shallow(expr: &str) -> Value {
|
|
Runtime::new()
|
|
.unwrap()
|
|
.eval_shallow(Source::new_eval(expr.into()).unwrap())
|
|
.unwrap()
|
|
}
|
|
|
|
pub fn eval_deep(expr: &str) -> Value {
|
|
Runtime::new()
|
|
.unwrap()
|
|
.eval_deep(Source::new_eval(expr.into()).unwrap())
|
|
.unwrap()
|
|
}
|
|
|
|
pub fn eval_deep_result(expr: &str) -> Result<Value> {
|
|
Runtime::new()
|
|
.unwrap()
|
|
.eval_deep(Source::new_eval(expr.into()).unwrap())
|
|
}
|
|
|
|
pub fn eval_result(expr: &str) -> Result<Value> {
|
|
Runtime::new()
|
|
.unwrap()
|
|
.eval(Source::new_eval(expr.into()).unwrap())
|
|
}
|