refactor functions and mixins into atrule folder
This commit is contained in:
parent
29011f88bb
commit
907ac3390c
@ -3,10 +3,10 @@ use std::iter::Peekable;
|
|||||||
|
|
||||||
use num_traits::cast::ToPrimitive;
|
use num_traits::cast::ToPrimitive;
|
||||||
|
|
||||||
|
pub(crate) use function::Function;
|
||||||
|
pub(crate) use mixin::{eat_include, Mixin};
|
||||||
use crate::common::{Keyword, Pos, Symbol};
|
use crate::common::{Keyword, Pos, Symbol};
|
||||||
use crate::error::SassResult;
|
use crate::error::SassResult;
|
||||||
use crate::function::Function;
|
|
||||||
use crate::mixin::Mixin;
|
|
||||||
use crate::scope::Scope;
|
use crate::scope::Scope;
|
||||||
use crate::selector::Selector;
|
use crate::selector::Selector;
|
||||||
use crate::unit::Unit;
|
use crate::unit::Unit;
|
||||||
@ -17,7 +17,9 @@ use crate::{Stmt, Token, TokenKind};
|
|||||||
use parse::eat_stmts;
|
use parse::eat_stmts;
|
||||||
use unknown::UnknownAtRule;
|
use unknown::UnknownAtRule;
|
||||||
|
|
||||||
|
mod function;
|
||||||
mod parse;
|
mod parse;
|
||||||
|
mod mixin;
|
||||||
mod unknown;
|
mod unknown;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
@ -84,16 +84,14 @@ use std::io::Write;
|
|||||||
use std::iter::{Iterator, Peekable};
|
use std::iter::{Iterator, Peekable};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use crate::atrule::{AtRule, AtRuleKind};
|
use crate::atrule::{AtRule, AtRuleKind, eat_include, Mixin, Function};
|
||||||
use crate::common::{Pos, Symbol, Whitespace};
|
use crate::common::{Pos, Symbol, Whitespace};
|
||||||
use crate::css::Css;
|
use crate::css::Css;
|
||||||
use crate::error::SassError;
|
use crate::error::SassError;
|
||||||
pub use crate::error::SassResult;
|
pub use crate::error::SassResult;
|
||||||
use crate::format::PrettyPrinter;
|
use crate::format::PrettyPrinter;
|
||||||
use crate::function::Function;
|
|
||||||
use crate::imports::import;
|
use crate::imports::import;
|
||||||
use crate::lexer::Lexer;
|
use crate::lexer::Lexer;
|
||||||
use crate::mixin::{eat_include, Mixin};
|
|
||||||
use crate::scope::{insert_global_var, Scope, GLOBAL_SCOPE};
|
use crate::scope::{insert_global_var, Scope, GLOBAL_SCOPE};
|
||||||
use crate::selector::Selector;
|
use crate::selector::Selector;
|
||||||
use crate::style::Style;
|
use crate::style::Style;
|
||||||
@ -109,10 +107,8 @@ mod common;
|
|||||||
mod css;
|
mod css;
|
||||||
mod error;
|
mod error;
|
||||||
mod format;
|
mod format;
|
||||||
mod function;
|
|
||||||
mod imports;
|
mod imports;
|
||||||
mod lexer;
|
mod lexer;
|
||||||
mod mixin;
|
|
||||||
mod scope;
|
mod scope;
|
||||||
mod selector;
|
mod selector;
|
||||||
mod style;
|
mod style;
|
||||||
|
@ -2,8 +2,7 @@ use std::cell::RefCell;
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::error::SassResult;
|
use crate::error::SassResult;
|
||||||
use crate::function::Function;
|
use crate::atrule::{Function, Mixin};
|
||||||
use crate::mixin::Mixin;
|
|
||||||
use crate::value::Value;
|
use crate::value::Value;
|
||||||
|
|
||||||
thread_local!(pub(crate) static GLOBAL_SCOPE: RefCell<Scope> = RefCell::new(Scope::new()));
|
thread_local!(pub(crate) static GLOBAL_SCOPE: RefCell<Scope> = RefCell::new(Scope::new()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user