Skip to content

Commit

Permalink
perf(lexer): remove an extra branch from identifier_name_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Sep 14, 2023
1 parent dd74d93 commit 406a3a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/oxc_parser/src/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,8 @@ impl<'a> Lexer<'a> {
}

fn identifier_name_handler(&mut self) -> &'a str {
let mut builder = AutoCow::new(self);
let c = self.consume_char();
builder.push_matching(c);
let builder = AutoCow::new(self);
self.consume_char();
self.identifier_name(builder)
}

Expand Down

0 comments on commit 406a3a9

Please sign in to comment.