1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
// Batch 2 — CSS token types // Loosely follows the token categories from the CSS Syntax Module Level 3 spec: // https://www.w3.org/TR/css-syntax-3/#tokenization // (simplified: we don't yet handle unicode-range, url(), or escaped characters) #[derive(Debug, Clone, PartialEq)] pub enum CssToken { Ident(String), AtKeyword(String), Hash(String), Str(String), Number(f64), Percentage(f64), Delim(char), Whitespace, Colon, Semicolon, Comma, LeftBrace, RightBrace, LeftParen, RightParen, LeftBracket, RightBracket, Eof, }