Skip to content

Commit

Permalink
perf opt
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Jul 28, 2024
1 parent 601c561 commit df038c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions parser/src/earley/regexvec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ impl RegexVec {
/// Return index of lowest matching regex if any.
/// Lazy regexes match as soon as they accept, while greedy only
/// if they accept and force EOI.
#[inline(always)]
pub fn lowest_match(&mut self, state: StateID) -> Option<(usize, usize)> {
if let Some(lowest_match) = self.state_descs[state.as_usize()].lowest_match {
return lowest_match;
Expand Down

0 comments on commit df038c6

Please sign in to comment.