Index: src/parsing/preparser.cc |
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc |
index 60dc330e00d445add99128b1f510f2da5e1e6552..df97c4dbd71234f6b618ea2735f993b806525baa 100644 |
--- a/src/parsing/preparser.cc |
+++ b/src/parsing/preparser.cc |
@@ -521,19 +521,12 @@ PreParser::Statement PreParser::ParseVariableDeclarations( |
PreParserExpression pattern = PreParserExpression::Default(); |
{ |
ExpressionClassifier pattern_classifier(this); |
- Token::Value next = peek(); |
pattern = ParsePrimaryExpression(&pattern_classifier, CHECK_OK); |
ValidateBindingPattern(&pattern_classifier, CHECK_OK); |
if (lexical) { |
ValidateLetPattern(&pattern_classifier, CHECK_OK); |
} |
- |
- if (!allow_harmony_destructuring_bind() && !pattern.IsIdentifier()) { |
- ReportUnexpectedToken(next); |
- *ok = false; |
- return Statement::Default(); |
- } |
} |
is_pattern = pattern.IsObjectLiteral() || pattern.IsArrayLiteral(); |
@@ -855,7 +848,6 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) { |
bool is_for_each = CheckInOrOf(&mode, ok); |
if (!*ok) return Statement::Default(); |
bool is_destructuring = is_for_each && |
- allow_harmony_destructuring_assignment() && |
(lhs->IsArrayLiteral() || lhs->IsObjectLiteral()); |
if (is_destructuring) { |