1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-30 22:23:44 +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

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