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

Unified Diff: src/parsing/preparser.cc

Issue 2510873005: A decimal integer literal with a leading 0 is now an error in strict mode. (Closed)
Patch Set: Created 4 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
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index 1025b8b136987f0af54715d2c8e1d9fc4995a8b3..5555ab2a887a9290fc5acd6d75e048cd33106939 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -151,8 +151,6 @@ PreParser::PreParseResult PreParser::PreParseFunction(
if (is_strict(function_scope->language_mode())) {
int end_pos = scanner()->location().end_pos;
CheckStrictOctalLiteral(function_scope->start_position(), end_pos, ok);
- CheckDecimalLiteralWithLeadingZero(function_scope->start_position(),
- end_pos);
}
}
return kPreParseSuccess;
@@ -217,7 +215,6 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
int end_position = scanner()->location().end_pos;
if (is_strict(language_mode)) {
CheckStrictOctalLiteral(start_position, end_position, CHECK_OK);
- CheckDecimalLiteralWithLeadingZero(start_position, end_position);
}
function_scope->set_end_position(end_position);
« src/parsing/parser-base.h ('K') | « src/parsing/preparser.h ('k') | src/parsing/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698