1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-14 22:15:13 +02:00

regex: print out final regex in trace mode

This is useful for debugging to see what regex is actually being run.
We put this as a trace since the regex can be quite gnarly. (It is not
pretty printed.)
This commit is contained in:
Andrew Gallant
2019-04-05 21:03:22 -04:00
parent 9f15e3b671
commit be7d6dd9ce
3 changed files with 23 additions and 1 deletions

View File

@ -34,6 +34,11 @@ impl CRLFMatcher {
}
Ok(CRLFMatcher { regex, names })
}
/// Return the underlying regex used by this matcher.
pub fn regex(&self) -> &Regex {
&self.regex
}
}
impl Matcher for CRLFMatcher {