| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index b0fdbee0c326fa502c8829c36a77d451ec9d119d..21beacc50e5819bac24ed01391f37c0c64193a0e 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -3388,7 +3388,7 @@ Expression* Parser::ParseMemberWithNewPrefixesExpression(PositionStack* stack,
|
| // Parse the initial primary or function expression.
|
| Expression* result = NULL;
|
| if (peek() == Token::FUNCTION) {
|
| - Expect(Token::FUNCTION, CHECK_OK);
|
| + Consume(Token::FUNCTION);
|
| int function_token_position = position();
|
| bool is_generator = allow_generators() && Check(Token::MUL);
|
| Handle<String> name;
|
| @@ -4265,20 +4265,20 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
|
| *ok = false;
|
| return NULL;
|
| }
|
| - if (name_loc.IsValid()) {
|
| - ReportMessageAt(name_loc, "strict_eval_arguments",
|
| + if (name_is_strict_reserved) {
|
| + ReportMessageAt(function_name_location, "unexpected_strict_reserved",
|
| Vector<const char*>::empty());
|
| *ok = false;
|
| return NULL;
|
| }
|
| - if (dupe_loc.IsValid()) {
|
| - ReportMessageAt(dupe_loc, "strict_param_dupe",
|
| + if (name_loc.IsValid()) {
|
| + ReportMessageAt(name_loc, "strict_eval_arguments",
|
| Vector<const char*>::empty());
|
| *ok = false;
|
| return NULL;
|
| }
|
| - if (name_is_strict_reserved) {
|
| - ReportMessageAt(function_name_location, "unexpected_strict_reserved",
|
| + if (dupe_loc.IsValid()) {
|
| + ReportMessageAt(dupe_loc, "strict_param_dupe",
|
| Vector<const char*>::empty());
|
| *ok = false;
|
| return NULL;
|
|
|