review feedback
This commit is contained in:
parent
a9e1d7c177
commit
be37b08a31
@ -1638,7 +1638,7 @@ class Parser {
|
||||
Parser(LineConsumer* line_consumer)
|
||||
: line_consumer_(line_consumer), line_(0) {}
|
||||
|
||||
// Feeds in some input, prase what it can, returning success/failure. Calling
|
||||
// Feeds in some input, parse what it can, returning success/failure. Calling
|
||||
// again after an error is undefined.
|
||||
bool ParseChunk(StringPiece chunk, std::string* out_error);
|
||||
|
||||
|
@ -251,13 +251,11 @@ class TestLineCollector : public LineConsumer {
|
||||
: lines_(inout_lines), reject_(reject_line), skip_msg_(skip_msg) {}
|
||||
|
||||
bool ConsumeLine(const StringPiece& line, std::string* out_error) override {
|
||||
if (reject_) {
|
||||
if (*reject_ == line) {
|
||||
if (!skip_msg_) {
|
||||
*out_error = std::string("Rejected '") + *reject_ + "'";
|
||||
}
|
||||
return false;
|
||||
if (reject_ && *reject_ == line) {
|
||||
if (!skip_msg_) {
|
||||
*out_error = std::string("Rejected '") + *reject_ + "'";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (lines_) {
|
||||
lines_->emplace_back(line);
|
||||
|
Loading…
Reference in New Issue
Block a user