use crate::basic_io::BasicIO;
use crate::expr::ExprValue;
use crate::xbasic::XBasicBuilder;
pub(crate) struct Std {}
impl Std {
pub fn attach<T>(xbb: &mut XBasicBuilder<T>)
where
T: BasicIO,
{
xbb.define_function("typeof".to_string(), 1, |args, _| {
ExprValue::String(
match args[0] {
ExprValue::String(_) => "String",
ExprValue::Boolean(_) => "Boolean",
ExprValue::Decimal(_) => "Decimal",
ExprValue::Integer(_) => "Integer",
}
.to_string(),
)
})
.unwrap();
}
}