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

Unified Diff: src/parser.cc

Issue 385613002: Parser sync tests for `let` identifiers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 6 years, 5 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 | test/cctest/test-parsing.cc » ('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 6886fcca2a0419281270fcecc70c5e54a9307b0d..ddd76103ea5a02bf60d78e6c0d72bbe8fa94e97c 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2013,6 +2013,7 @@ Block* Parser::ParseVariableDeclarations(
is_const = true;
needs_init = true;
} else if (peek() == Token::LET && strict_mode() == STRICT) {
+ ASSERT(allow_harmony_scoping());
Consume(Token::LET);
if (var_context == kStatement) {
// Let declarations are only allowed in source element positions.
@@ -3052,6 +3053,7 @@ Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels,
init = variable_statement;
}
} else if (peek() == Token::LET && strict_mode() == STRICT) {
+ ASSERT(allow_harmony_scoping());
const AstRawString* name = NULL;
VariableDeclarationProperties decl_props = kHasNoInitializers;
Block* variable_statement =
« no previous file with comments | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698