Expand description
A simpler and faster CSS parser.
§Usages
use tele_tokenizer::Tokenizer;
use tele_parser::Parser;
// Create a tokenizer
let mut tokenizer: Tokenizer = r".foo { color: red; }".into();
// Tokenize based on the given raw string,
let tokens = tokenizer.tokenize().unwrap();
// Create a parser from a sequence of tokens
let parser = Parser::from(tokens);
// parsing it
let ast = parser.parse();
Structs§
- AtRule
Node - Represents a at-rule
- Declaration
Node - Represents a CSS declaration
- Dimension
Node - Function
Node - Ident
Node - Represents an identifier as the value of a CSS declaration
- Loc
- Represents the location information of the token in the source file
- Number
Node - Operator
Node - Parser
- Represents the CSS parser.
- Percentage
Node - RawNode
- Rule
SetNode - Represents a ruleset
- String
Node - Represents a string as the value of a CSS declaration
- Style
Sheet Node - Represents a stylesheet
- URLNode
Enums§
- Statement
Node - A statement is either a ruleset or an at-rule
- Value
Type Aliases§
- AstType
- The root node of an AST
- Parser
Result