Add no_function
feature to disable script-defined functions.
This commit is contained in:
@@ -9,6 +9,7 @@ fn test_not() -> Result<(), EvalAltResult> {
|
||||
false
|
||||
);
|
||||
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
assert_eq!(engine.eval::<bool>("fn not(x) { !x } not(false)")?, true);
|
||||
|
||||
// TODO - do we allow stacking unary operators directly? e.g '!!!!!!!true'
|
||||
|
Reference in New Issue
Block a user