Crates.io | eval-utility |
lib.rs | eval-utility |
version | 0.1.5 |
source | src |
created_at | 2022-07-14 21:10:49.160932 |
updated_at | 2022-10-04 12:34:38.217026 |
description | Wrapper function of the evaluator crate. Provides python-like built-in functions. |
homepage | https://github.com/floating-floaties/eval-utility/ |
repository | https://github.com/floating-floaties/eval-utility/ |
max_upload_size | |
id | 625907 |
size | 80,992 |
Wrapper function of the resolver crate. Provides python-like built-in functions.
[dependencies]
resolver = "^0.1"
eval-utility = "^0.1"
See test cases in lib.rs
for more examples.
use eval_utility::eval_wrapper::{expr_wrapper, EvalConfig};
fn main () {
let expression = "float('42.42') == 42.42";
let expr = expr_wrapper(
resolver::Expr::new(expression),
EvalConfig::default(),
);
println!("{:?}", expr.exec());
}