Chromium Code Reviews| Index: src/preparser.h |
| diff --git a/src/preparser.h b/src/preparser.h |
| index a17296349b362df6afefbb5b8538d7c030915270..a580a47d8639ecd92fc53f42b2115c5b78dd8468 100644 |
| --- a/src/preparser.h |
| +++ b/src/preparser.h |
| @@ -2319,8 +2319,13 @@ typename Traits::Type::ExpressionList ParserBase<Traits>::ParseArguments( |
| } |
| done = (peek() == Token::RPAREN); |
|
Yang
2015/03/16 07:24:33
I think it's cleaner and easier to read if we chec
yurys
2015/03/16 08:56:23
Done.
|
| if (!done) { |
| - // Need {} because of the CHECK_OK_CUSTOM macro. |
| - Expect(Token::COMMA, CHECK_OK_CUSTOM(NullExpressionList)); |
| + Scanner::Location location = scanner_->location(); |
| + Token::Value next = Next(); |
| + if (Token::COMMA != next) { |
| + ReportMessageAt(location, "unterminated_arg_list"); |
| + *ok = false; |
| + return this->NullExpressionList(); |
| + } |
| } |
| } |
| Expect(Token::RPAREN, CHECK_OK_CUSTOM(NullExpressionList)); |
|
Yang
2015/03/16 07:24:33
... check for Token::LPAREN here, throwing untermi
yurys
2015/03/16 08:56:23
Done.
|