Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 23, 2024
1 parent 7c13867 commit bf593ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/swc_ecma_parser/src/v2/lexer/regex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<'a> Lexer<'a> {
}
}

let pattern_end = self.offset() - 1; // -1 to exclude `/`
let pattern_end = self.offset() - BytePos(1); // -1 to exclude `/`
let mut flags = RegExpFlags::empty();

while let Some(ch @ ('$' | '_' | 'a'..='z' | 'A'..='Z' | '0'..='9')) = self.peek() {
Expand Down

0 comments on commit bf593ca

Please sign in to comment.