Index: tools/gn/parser.cc |
diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc |
index 651c0f88d5e8f0e965117764fe6f4547acbc5852..df027ca91808e9fc2b0d800eb3a8904aa80da407 100644 |
--- a/tools/gn/parser.cc |
+++ b/tools/gn/parser.cc |
@@ -388,9 +388,9 @@ 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()) |
scottmg
2015/04/07 19:49:52
nit; braces for multiline if.
mdempsky
2015/04/07 19:58:44
Done.
|
+ *err_ = Err(token, "Expected right hand side for '" + |
+ token.value().as_string() + "'"); |
scottmg
2015/04/07 19:49:52
is there a test that hits this code path now? if y
mdempsky
2015/04/07 19:58:44
Yes, DoExpressionErrorTest("(a +", 1, 4) in Parser
|
return scoped_ptr<ParseNode>(); |
} |
scoped_ptr<BinaryOpNode> binary_op(new BinaryOpNode); |