diff --git a/src/lib.rs b/src/lib.rs index 64d2780..f63a799 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,6 +11,7 @@ mod value; pub use configuration::{Configuration, EmptyConfiguration, HashMapConfiguration}; pub use error::Error; pub use function::Function; +pub use tree::Node; pub use value::Value; pub fn eval(string: &str) -> Result { @@ -24,6 +25,10 @@ pub fn eval_with_configuration( tree::tokens_to_operator_tree(token::tokenize(string)?)?.eval(configuration) } +pub fn build_operator_tree(string: &str) -> Result { + tree::tokens_to_operator_tree(token::tokenize(string)?) +} + #[cfg(test)] mod test { use crate::{eval, value::Value};