Skip to content

Commit

Permalink
refactor(parser): remove extraneous code from regex parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel authored and Boshen committed Jan 13, 2024
1 parent 712e99c commit 1d6ac30
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions crates/oxc_parser/src/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,6 @@ impl<'a> Lexer<'a> {

while let Some(ch @ ('$' | '_' | 'a'..='z' | 'A'..='Z' | '0'..='9')) = self.peek() {
self.current.chars.next();
if !ch.is_ascii_lowercase() {
self.error(diagnostics::RegExpFlag(ch, self.current_offset()));
continue;
}
let flag = if let Ok(flag) = RegExpFlags::try_from(ch) {
flag
} else {
Expand Down

0 comments on commit 1d6ac30

Please sign in to comment.