If a literal is entirely whitespace, then it's quite likely that it is very common. So when that case occurs, just don't do (inner) literal optimizations at all. The regex engine may still make sub-optimal decisions here, but that's a problem for another day. Fixes #1087
30 lines
523 B
Rust
30 lines
523 B
Rust
/*!
|
|
An implementation of `grep-matcher`'s `Matcher` trait for Rust's regex engine.
|
|
*/
|
|
|
|
#![deny(missing_docs)]
|
|
|
|
extern crate aho_corasick;
|
|
extern crate bstr;
|
|
extern crate grep_matcher;
|
|
#[macro_use]
|
|
extern crate log;
|
|
extern crate regex;
|
|
extern crate regex_syntax;
|
|
extern crate thread_local;
|
|
|
|
pub use error::{Error, ErrorKind};
|
|
pub use matcher::{RegexCaptures, RegexMatcher, RegexMatcherBuilder};
|
|
|
|
mod ast;
|
|
mod config;
|
|
mod crlf;
|
|
mod error;
|
|
mod literal;
|
|
mod matcher;
|
|
mod multi;
|
|
mod non_matching;
|
|
mod strip;
|
|
mod util;
|
|
mod word;
|