grass/src/builtin/mod.rs
2020-02-02 18:05:36 -05:00

24 lines
453 B
Rust

use lazy_static::lazy_static;
use std::collections::BTreeMap;
use crate::args::CallArgs;
use crate::value::Value;
mod color;
mod list;
mod map;
mod math;
mod meta;
mod selector;
mod string;
pub(crate) type Builtin = Box<dyn Fn(&CallArgs) -> Option<Value> + Send + Sync>;
lazy_static! {
pub(crate) static ref GLOBAL_FUNCTIONS: BTreeMap<String, Builtin> = {
let mut m = BTreeMap::new();
color::register(&mut m);
m
};
}