Create module for builtin functions
This commit is contained in:
parent
9af3670d16
commit
5295d18f02
15
src/builtin/mod.rs
Normal file
15
src/builtin/mod.rs
Normal file
@ -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<String, Function> = {
|
||||||
|
let m = BTreeMap::new();
|
||||||
|
m
|
||||||
|
};
|
||||||
|
}
|
@ -62,6 +62,7 @@ use crate::utils::{devour_whitespace, eat_variable_value, IsComment, IsWhitespac
|
|||||||
|
|
||||||
mod args;
|
mod args;
|
||||||
mod atrule;
|
mod atrule;
|
||||||
|
mod builtin;
|
||||||
mod color;
|
mod color;
|
||||||
mod common;
|
mod common;
|
||||||
mod css;
|
mod css;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user