Remove TokenKind::Unit variant

This commit is contained in:
ConnorSkees 2020-01-22 00:54:03 -05:00
parent dc82d999e9
commit 8acb535347
2 changed files with 0 additions and 3 deletions

View File

@ -106,7 +106,6 @@ pub(crate) enum TokenKind {
AtRule(AtRuleKind),
Keyword(Keyword),
Number(String),
Unit(Unit),
Whitespace(Whitespace),
Variable(String),
Attribute(Attribute),
@ -123,7 +122,6 @@ impl Display for TokenKind {
TokenKind::Symbol(s) => write!(f, "{}", s),
TokenKind::AtRule(s) => write!(f, "{}", s),
TokenKind::Op(s) => write!(f, "{}", s),
TokenKind::Unit(s) => write!(f, "{}", s),
TokenKind::Whitespace(s) => write!(f, "{}", s),
TokenKind::Attribute(s) => write!(f, "{}", s),
TokenKind::Keyword(kw) => write!(f, "{}", kw),

View File

@ -240,7 +240,6 @@ impl<'a> SelectorParser<'a> {
if let Some(Token { kind, .. }) = tokens.next() {
match kind {
TokenKind::Ident(ident) => self.selectors.push(SelectorKind::Element(ident)),
TokenKind::Unit(u) => self.selectors.push(SelectorKind::Element(u.to_string())),
TokenKind::Symbol(Symbol::Period) => self.selectors.push(SelectorKind::Class),
TokenKind::Symbol(Symbol::Hash) => self.selectors.push(SelectorKind::Id),
TokenKind::Symbol(Symbol::Colon) => self.consume_pseudo_selector(tokens),