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

Unified Diff: src/preparser.cc

Issue 153793002: Tests and fixes for (pre)parse errors related to future reserved words. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: tiny variable rename Created 6 years, 10 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/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 21010ae6d2ca5360de77ffe2f7f0a130db7cafb7..b3a271a8c63f65edec7758dca1e23a6d37720d5b 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -1497,7 +1497,7 @@ PreParser::Identifier PreParser::ParseIdentifier(bool* ok) {
case Token::FUTURE_RESERVED_WORD: {
Scanner::Location location = scanner()->location();
ReportMessageAt(location.beg_pos, location.end_pos,
- "reserved_word", NULL);
+ "unexpected_reserved", NULL);
*ok = false;
return GetIdentifierSymbol();
}
@@ -1565,7 +1565,7 @@ void PreParser::StrictModeIdentifierViolation(Scanner::Location location,
bool* ok) {
const char* type = eval_args_type;
if (identifier.IsFutureReserved()) {
- type = "reserved_word";
+ type = "unexpected_reserved";
} else if (identifier.IsFutureStrictReserved() || identifier.IsYield()) {
type = "unexpected_strict_reserved";
}
« 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