From 02e28eab3009658866943b6d57bd5ffdca04c1dc Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Fri, 12 Jan 2024 18:27:47 +0000 Subject: [PATCH] refactor(parser): remove extraneous code from regex parsing --- crates/oxc_parser/src/lexer/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/oxc_parser/src/lexer/mod.rs b/crates/oxc_parser/src/lexer/mod.rs index e41a1cad9ec220..f563a64c7f72c4 100644 --- a/crates/oxc_parser/src/lexer/mod.rs +++ b/crates/oxc_parser/src/lexer/mod.rs @@ -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 {