Implement variable resolver.

This commit is contained in:
Stephen Chung
2020-10-11 21:58:11 +08:00
parent 9d93dac8e7
commit fd5a932611
18 changed files with 511 additions and 237 deletions

View File

@@ -9,7 +9,7 @@ fn test_unary_minus() -> Result<(), Box<EvalAltResult>> {
#[cfg(not(feature = "no_function"))]
assert_eq!(engine.eval::<INT>("fn neg(x) { -x } neg(5)")?, -5);
assert_eq!(engine.eval::<INT>("5 - -+++--+-5")?, 0);
assert_eq!(engine.eval::<INT>("5 - -+ + + - -+-5")?, 0);
Ok(())
}