Function regex_automata::meta::reverse_inner::prefilter

source ยท
fn prefilter(hir: &Hir) -> Option<Prefilter>
Expand description

Attempt to extract a prefilter from an HIR expression.

We do a little massaging here to do our best that the prefilter we get out of this is probably fast. Basically, the false positive rate has a much higher impact for things like the reverse inner optimization because more work needs to potentially be done for each candidate match.

Note that this assumes leftmost-first match semantics, so callers must not call this otherwise.