Remove TokenKind::Unit variant
This commit is contained in:
parent
dc82d999e9
commit
8acb535347
@ -106,7 +106,6 @@ pub(crate) enum TokenKind {
|
|||||||
AtRule(AtRuleKind),
|
AtRule(AtRuleKind),
|
||||||
Keyword(Keyword),
|
Keyword(Keyword),
|
||||||
Number(String),
|
Number(String),
|
||||||
Unit(Unit),
|
|
||||||
Whitespace(Whitespace),
|
Whitespace(Whitespace),
|
||||||
Variable(String),
|
Variable(String),
|
||||||
Attribute(Attribute),
|
Attribute(Attribute),
|
||||||
@ -123,7 +122,6 @@ impl Display for TokenKind {
|
|||||||
TokenKind::Symbol(s) => write!(f, "{}", s),
|
TokenKind::Symbol(s) => write!(f, "{}", s),
|
||||||
TokenKind::AtRule(s) => write!(f, "{}", s),
|
TokenKind::AtRule(s) => write!(f, "{}", s),
|
||||||
TokenKind::Op(s) => write!(f, "{}", s),
|
TokenKind::Op(s) => write!(f, "{}", s),
|
||||||
TokenKind::Unit(s) => write!(f, "{}", s),
|
|
||||||
TokenKind::Whitespace(s) => write!(f, "{}", s),
|
TokenKind::Whitespace(s) => write!(f, "{}", s),
|
||||||
TokenKind::Attribute(s) => write!(f, "{}", s),
|
TokenKind::Attribute(s) => write!(f, "{}", s),
|
||||||
TokenKind::Keyword(kw) => write!(f, "{}", kw),
|
TokenKind::Keyword(kw) => write!(f, "{}", kw),
|
||||||
|
@ -240,7 +240,6 @@ impl<'a> SelectorParser<'a> {
|
|||||||
if let Some(Token { kind, .. }) = tokens.next() {
|
if let Some(Token { kind, .. }) = tokens.next() {
|
||||||
match kind {
|
match kind {
|
||||||
TokenKind::Ident(ident) => self.selectors.push(SelectorKind::Element(ident)),
|
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::Period) => self.selectors.push(SelectorKind::Class),
|
||||||
TokenKind::Symbol(Symbol::Hash) => self.selectors.push(SelectorKind::Id),
|
TokenKind::Symbol(Symbol::Hash) => self.selectors.push(SelectorKind::Id),
|
||||||
TokenKind::Symbol(Symbol::Colon) => self.consume_pseudo_selector(tokens),
|
TokenKind::Symbol(Symbol::Colon) => self.consume_pseudo_selector(tokens),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user