Index: tools/gn/parser.cc |
diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc |
index 651c0f88d5e8f0e965117764fe6f4547acbc5852..c207ce7179ec72474ad20603d0e8ab929b7f0793 100644 |
--- a/tools/gn/parser.cc |
+++ b/tools/gn/parser.cc |
@@ -388,9 +388,10 @@ scoped_ptr<ParseNode> Parser::BinaryOperator(scoped_ptr<ParseNode> left, |
scoped_ptr<ParseNode> right = |
ParseExpression(expressions_[token.type()].precedence + 1); |
if (!right) { |
- *err_ = |
- Err(token, |
- "Expected right hand side for '" + token.value().as_string() + "'"); |
+ if (!has_error()) { |
+ *err_ = Err(token, "Expected right hand side for '" + |
+ token.value().as_string() + "'"); |
+ } |
return scoped_ptr<ParseNode>(); |
} |
scoped_ptr<BinaryOpNode> binary_op(new BinaryOpNode); |