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

Unified Diff: src/parser.cc

Issue 1315673009: Sloppy-mode let parsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: clarify comment 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 | « no previous file | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 3f635c70df275ea837606aa81354f6daea36a882..b22d535cf4be7c60e0619b4a49a65bd3b2382b8e 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1402,7 +1402,7 @@ Statement* Parser::ParseStatementListItem(bool* ok) {
case Token::VAR:
return ParseVariableStatement(kStatementListItem, NULL, ok);
case Token::LET:
- if (allow_let()) {
+ if (IsNextLetKeyword()) {
return ParseVariableStatement(kStatementListItem, NULL, ok);
}
break;
@@ -2652,9 +2652,6 @@ Statement* Parser::ParseExpressionOrLabelledStatement(
}
break;
- // TODO(arv): Handle `let [`
- // https://code.google.com/p/v8/issues/detail?id=3847
-
default:
break;
}
@@ -3564,7 +3561,7 @@ Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels,
DeclarationParsingResult parsing_result;
if (peek() != Token::SEMICOLON) {
if (peek() == Token::VAR || (peek() == Token::CONST && allow_const()) ||
- (peek() == Token::LET && allow_let())) {
+ (peek() == Token::LET && IsNextLetKeyword())) {
ParseVariableDeclarations(kForStatement, &parsing_result, CHECK_OK);
is_const = parsing_result.descriptor.mode == CONST;
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698