use std::sync::{Arc, Mutex};
use mumu::parser::interpreter::{Interpreter, DynamicFnInfo};
use mumu::parser::types::{FunctionValue, Value};
pub fn register_tree_to_string(interp: &mut Interpreter) {
let f = Arc::new(Mutex::new(|interp: &mut Interpreter, args: Vec<Value>| {
crate::share::to_string::to_string_bridge(interp, args)
}));
let info = DynamicFnInfo::new(f, true);
interp.register_dynamic_function_ex("tree:to_string", info);
interp.set_variable(
"tree:to_string",
Value::Function(Box::new(FunctionValue::Named("tree:to_string".to_string()))),
);
}