| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 9fe6a3b6639dabee7dd3322fd61d9168bc6b8f33..49fd7ba50500191e090c7de1cd704f48d5fca012 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -740,8 +740,8 @@ FunctionLiteral* ParserTraits::ParseFunctionLiteral(
|
| }
|
|
|
|
|
| -Expression* ParserTraits::ParsePostfixExpression(bool* ok) {
|
| - return parser_->ParsePostfixExpression(ok);
|
| +Expression* ParserTraits::ParseLeftHandSideExpression(bool* ok) {
|
| + return parser_->ParseLeftHandSideExpression(ok);
|
| }
|
|
|
|
|
| @@ -3043,37 +3043,6 @@ Statement* Parser::ParseForStatement(ZoneStringList* labels, bool* ok) {
|
| }
|
|
|
|
|
| -Expression* Parser::ParsePostfixExpression(bool* ok) {
|
| - // PostfixExpression ::
|
| - // LeftHandSideExpression ('++' | '--')?
|
| -
|
| - Scanner::Location lhs_location = scanner()->peek_location();
|
| - Expression* expression = ParseLeftHandSideExpression(CHECK_OK);
|
| - if (!scanner()->HasAnyLineTerminatorBeforeNext() &&
|
| - Token::IsCountOp(peek())) {
|
| - if (expression == NULL || !expression->IsValidLeftHandSide()) {
|
| - ReportMessageAt(lhs_location, "invalid_lhs_in_postfix_op", true);
|
| - *ok = false;
|
| - return NULL;
|
| - }
|
| -
|
| - if (strict_mode() == STRICT) {
|
| - // Postfix expression operand in strict mode may not be eval or arguments.
|
| - CheckStrictModeLValue(expression, CHECK_OK);
|
| - }
|
| - MarkExpressionAsLValue(expression);
|
| -
|
| - Token::Value next = Next();
|
| - expression =
|
| - factory()->NewCountOperation(next,
|
| - false /* postfix */,
|
| - expression,
|
| - position());
|
| - }
|
| - return expression;
|
| -}
|
| -
|
| -
|
| Expression* Parser::ParseLeftHandSideExpression(bool* ok) {
|
| // LeftHandSideExpression ::
|
| // (NewExpression | MemberExpression) ...
|
|
|