2 unstable releases

0.2.0 Mar 26, 2022
0.1.0 Feb 27, 2022

#2 in #telecss


Used in 2 crates

MIT license

43KB
1K SLoC

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();

Dependencies

~0.4–1MB
~23K SLoC