Skip to content

Commit

Permalink
perf: revert unify consume sc
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk committed May 3, 2024
1 parent ecf02cd commit 1dba17f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,12 @@ impl<'s> Lexer<'s> {
fn lex_impl<T: Visitor<'s>>(&mut self, visitor: &mut T) -> Option<()> {
self.consume()?;
while self.cur().is_some() {
self.consume_white_space_and_comments()?;
self.consume_comments()?;
let c = self.cur()?;
if c < '\u{80}' {
// https://drafts.csswg.org/css-syntax/#consume-token
match c {
c if is_white_space(c) => self.consume_space()?,
C_QUOTATION_MARK => self.consume_string(visitor, C_QUOTATION_MARK)?,
C_NUMBER_SIGN => self.consume_number_sign(visitor)?,
C_APOSTROPHE => self.consume_string(visitor, C_APOSTROPHE)?,
Expand Down

0 comments on commit 1dba17f

Please sign in to comment.