Create module for builtin functions

This commit is contained in:
ConnorSkees 2020-01-25 20:58:30 -05:00
parent 9af3670d16
commit 5295d18f02
2 changed files with 16 additions and 0 deletions

15
src/builtin/mod.rs Normal file
View 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
};
}

View File

@ -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;