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

Unified Diff: src/parser.cc

Issue 1226103002: [es6] Handle conflicts for sloppy let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: more comments and git rebase Created 5 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 | 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 a45a4b15e60c906256719822d08ae8f2b16921b1..bf12fa4135b4dafd6d0028ce3dcf79eb7469ec7d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1062,6 +1062,8 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) {
if (ok && is_strict(language_mode())) {
CheckStrictOctalLiteral(beg_pos, scanner()->location().end_pos, &ok);
+ }
+ if (ok && (is_strict(language_mode()) || allow_harmony_sloppy())) {
CheckConflictingVarDeclarations(scope_, &ok);
}
@@ -4141,6 +4143,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
if (is_strict(language_mode())) {
CheckStrictOctalLiteral(scope->start_position(), scope->end_position(),
CHECK_OK);
+ }
+ if (is_strict(language_mode()) || allow_harmony_sloppy()) {
CheckConflictingVarDeclarations(scope, CHECK_OK);
}
}
« 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