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

Unified Diff: src/preparser.cc

Issue 1292393002: [parser] make kInvalidLhsInFor a SyntaxError (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Correct tests Created 5 years, 4 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
« no previous file with comments | « src/preparser.h ('k') | test/message/for-loop-invalid-lhs.out » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 9a30ca58cc71b18031b17ff9cd152e95826a50f1..b1541f616afe133554881e99aec4f71a9f5e45e0 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -922,7 +922,7 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) {
if (!*ok) return Statement::Default();
lhs = CheckAndRewriteReferenceExpression(
lhs, lhs_beg_pos, lhs_end_pos, MessageTemplate::kInvalidLhsInFor,
- CHECK_OK);
+ kSyntaxError, CHECK_OK);
ParseExpression(true, CHECK_OK);
Expect(Token::RPAREN, CHECK_OK);
ParseSubStatement(CHECK_OK);
« no previous file with comments | « src/preparser.h ('k') | test/message/for-loop-invalid-lhs.out » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698