diff --git a/crates/oxc_parser/src/lexer/mod.rs b/crates/oxc_parser/src/lexer/mod.rs index e41a1cad9ec22..f563a64c7f72c 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 {