Commit 35354cb9 authored by marja@chromium.org's avatar marja@chromium.org

Tests and fixes for (pre)parse errors related to future reserved words.

This contains the following fixes:
- PreParser was using an error "reserved_word" which doesn't exist in
messages.js. Changed it to "unexpected_reserved".

BUG=3126
LOG=N
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/153793002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5859e4d4
......@@ -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";
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment