Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: src/preparser.cc

Issue 1107053002: Parsing binding patterns. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index d8c84260e2454f36415b6d02ae7de9257a7eee5e..050af1ced1869a374d30a98c9e275f32a0cd36a9 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -520,7 +520,7 @@ PreParser::Statement PreParser::ParseVariableDeclarations(
ParsePrimaryExpression(&pattern_classifier, CHECK_OK);
ValidateBindingPattern(&pattern_classifier, CHECK_OK);
- if (!pattern.IsIdentifier()) {
+ if (!FLAG_harmony_destructuring && !pattern.IsIdentifier()) {
ReportUnexpectedToken(next);
*ok = false;
return Statement::Default();

Powered by Google App Engine
This is Rietveld 408576698