use std::{ convert::TryFrom, ffi::{OsStr, OsString}, fs, mem, path::Path, vec::IntoIter, }; use codemap::{CodeMap, Span, Spanned}; use num_traits::cast::ToPrimitive; use peekmore::{PeekMore, PeekMoreIterator}; use crate::{ args::{CallArgs, FuncArgs}, atrule::{AtRuleKind, Function, Mixin}, common::{Brackets, Identifier, ListSeparator}, error::SassResult, lexer::Lexer, scope::Scope, selector::{Selector, SelectorParser}, style::Style, unit::Unit, utils::{ is_name, is_name_start, peek_ident_no_interpolation, read_until_closing_curly_brace, read_until_closing_paren, read_until_closing_quote, read_until_newline, read_until_open_curly_brace, read_until_semicolon_or_closing_curly_brace, }, value::{Number, Value}, {Cow, Token}, }; use common::{Branch, NeverEmptyVec, SelectorOrStyle}; mod args; pub mod common; mod ident; mod value; pub(crate) enum Comment { Silent, Loud(String), } #[derive(Debug)] struct VariableValue { value: Spanned, global: bool, default: bool, } impl VariableValue { pub const fn new(value: Spanned, global: bool, default: bool) -> Self { Self { value, global, default, } } } #[derive(Debug, Clone)] pub(crate) enum Stmt { RuleSet { super_selector: Selector, selector: Selector, body: Vec, }, Style(Box