1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// Batch 1 — HTML token types // These mirror the token categories described in the WHATWG HTML5 tokenization spec: // https://html.spec.whatwg.org/multipage/parsing.html#tokenization #[derive(Debug, Clone, PartialEq)] pub enum Token { Doctype { name: Option<String>, }, StartTag { name: String, attributes: Vec<(String, String)>, self_closing: bool, }, EndTag { name: String, }, Comment(String), Text(String), Eof, }