Fix required literal handling and add debug prints.

In particular, if we had an inner literal and were doing a case insensitive
search, then the literals are dropped because we previously only allowed
a single inner literal to have an effect. Now we allow alternations of
inner literals, but still don't quite take full advantage.
This commit is contained in:
Andrew Gallant
2016-09-06 19:33:03 -04:00
parent 0891b4a3c0
commit fd3e5069b6
4 changed files with 67 additions and 8 deletions

View File

@@ -152,6 +152,7 @@ impl GrepBuilder {
.unicode(true)
.case_insensitive(self.opts.case_insensitive)
.parse(&self.pattern));
debug!("regex ast:\n{:#?}", expr);
Ok(try!(nonl::remove(expr, self.opts.line_terminator)))
}
}