diff --git a/src/builtin/mod.rs b/src/builtin/mod.rs new file mode 100644 index 0000000..c8bafb9 --- /dev/null +++ b/src/builtin/mod.rs @@ -0,0 +1,15 @@ +use lazy_static::lazy_static; +use std::collections::BTreeMap; + +use crate::common::Scope; +use crate::function::Function; +use crate::value::Value; + +pub(crate) type Builtin = dyn Fn(&Scope) -> Value + Send + Sync; + +lazy_static! { + pub(crate) static ref GLOBAL_FUNCTIONS: BTreeMap = { + let m = BTreeMap::new(); + m + }; +} diff --git a/src/lib.rs b/src/lib.rs index 1cb2e44..024b647 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -62,6 +62,7 @@ use crate::utils::{devour_whitespace, eat_variable_value, IsComment, IsWhitespac mod args; mod atrule; +mod builtin; mod color; mod common; mod css;