refactor functions and mixins into atrule folder

This commit is contained in:
ConnorSkees 2020-03-22 14:26:33 -04:00
parent 29011f88bb
commit 907ac3390c
5 changed files with 6 additions and 9 deletions

View File

@ -3,10 +3,10 @@ use std::iter::Peekable;
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::error::SassResult;
use crate::function::Function;
use crate::mixin::Mixin;
use crate::scope::Scope;
use crate::selector::Selector;
use crate::unit::Unit;
@ -17,7 +17,9 @@ use crate::{Stmt, Token, TokenKind};
use parse::eat_stmts;
use unknown::UnknownAtRule;
mod function;
mod parse;
mod mixin;
mod unknown;
#[derive(Debug, Clone)]

View File

@ -84,16 +84,14 @@ use std::io::Write;
use std::iter::{Iterator, Peekable};
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::css::Css;
use crate::error::SassError;
pub use crate::error::SassResult;
use crate::format::PrettyPrinter;
use crate::function::Function;
use crate::imports::import;
use crate::lexer::Lexer;
use crate::mixin::{eat_include, Mixin};
use crate::scope::{insert_global_var, Scope, GLOBAL_SCOPE};
use crate::selector::Selector;
use crate::style::Style;
@ -109,10 +107,8 @@ mod common;
mod css;
mod error;
mod format;
mod function;
mod imports;
mod lexer;
mod mixin;
mod scope;
mod selector;
mod style;

View File

@ -2,8 +2,7 @@ use std::cell::RefCell;
use std::collections::HashMap;
use crate::error::SassResult;
use crate::function::Function;
use crate::mixin::Mixin;
use crate::atrule::{Function, Mixin};
use crate::value::Value;
thread_local!(pub(crate) static GLOBAL_SCOPE: RefCell<Scope> = RefCell::new(Scope::new()));