#expression-evaluator #evaluator #parse #expression #condition

eval-utility

Wrapper function of the evaluator crate. Provides python-like built-in functions.

1 unstable release

0.1.5 Oct 4, 2022
0.1.4 Sep 19, 2022
0.1.3 Jul 26, 2022

#31 in #expression-evaluator

GPL-3.0-only

34KB
766 lines

Eval Utility

Wrapper function of the resolver crate. Provides python-like built-in functions.

Crate

[dependencies]
resolver = "^0.1"
eval-utility = "^0.1"

Example

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());
}

Dependencies

~4.5–6.5MB
~115K SLoC