Index: src/preparser.cc |
diff --git a/src/preparser.cc b/src/preparser.cc |
index a12bf14e5860f50b8f4e0cf2a22f778aa1c99d95..4b86d78597d3c791d0bbdd7fcebbab38b69acf17 100644 |
--- a/src/preparser.cc |
+++ b/src/preparser.cc |
@@ -1039,9 +1039,12 @@ PreParser::Statement PreParser::ParseTryStatement(bool* ok) { |
if (tok == Token::CATCH) { |
Consume(Token::CATCH); |
Expect(Token::LPAREN, CHECK_OK); |
- ParseIdentifier(kDontAllowRestrictedIdentifiers, CHECK_OK); |
+ ExpressionClassifier pattern_classifier; |
+ ParsePrimaryExpression(&pattern_classifier, CHECK_OK); |
+ ValidateBindingPattern(&pattern_classifier, CHECK_OK); |
Expect(Token::RPAREN, CHECK_OK); |
{ |
+ // TODO(adamk): Make this CATCH_SCOPE |
Scope* with_scope = NewScope(scope_, WITH_SCOPE); |
BlockState block_state(&scope_, with_scope); |
ParseBlock(CHECK_OK); |