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

Unified Diff: src/preparser.h

Issue 1411873004: [es6] allow any LeftHandSideExpression in for-of loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bug in loop-assignment-analyzer which resulted in incorrect code Created 5 years, 1 month 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
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 056c011381994284826075e74d3452731579e293..788ed431fe0ac3d0193002c63e42718e68f9ef69 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -421,8 +421,7 @@ class ParserBase : public Traits {
}
}
- bool CheckInOrOf(
- bool accept_OF, ForEachStatement::VisitMode* visit_mode, bool* ok) {
+ bool CheckInOrOf(ForEachStatement::VisitMode* visit_mode, bool* ok) {
if (Check(Token::IN)) {
if (is_strong(language_mode())) {
ReportMessageAt(scanner()->location(), MessageTemplate::kStrongForIn);
@@ -431,7 +430,7 @@ class ParserBase : public Traits {
*visit_mode = ForEachStatement::ENUMERATE;
}
return true;
- } else if (accept_OF && CheckContextualKeyword(CStrVector("of"))) {
+ } else if (CheckContextualKeyword(CStrVector("of"))) {
*visit_mode = ForEachStatement::ITERATE;
return true;
}
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698