Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 3627bafb96eee79d5f785654004ec5b73a229379..b2d5aadce7ef9382d458af57cfbfb90db687e395 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -638,8 +638,9 @@ FunctionLiteral* ParserTraits::ParseFunctionLiteral( |
} |
-Expression* ParserTraits::ParseConditionalExpression(bool accept_IN, bool* ok) { |
- return parser_->ParseConditionalExpression(accept_IN, ok); |
+Expression* ParserTraits::ParseBinaryExpression(int prec, bool accept_IN, |
+ bool* ok) { |
+ return parser_->ParseBinaryExpression(prec, accept_IN, ok); |
} |
@@ -2930,27 +2931,6 @@ Statement* Parser::ParseForStatement(ZoneStringList* labels, bool* ok) { |
} |
-// Precedence = 3 |
-Expression* Parser::ParseConditionalExpression(bool accept_IN, bool* ok) { |
- // ConditionalExpression :: |
- // LogicalOrExpression |
- // LogicalOrExpression '?' AssignmentExpression ':' AssignmentExpression |
- |
- int pos = peek_position(); |
- // We start using the binary expression parser for prec >= 4 only! |
- Expression* expression = ParseBinaryExpression(4, accept_IN, CHECK_OK); |
- if (peek() != Token::CONDITIONAL) return expression; |
- Consume(Token::CONDITIONAL); |
- // In parsing the first assignment expression in conditional |
- // expressions we always accept the 'in' keyword; see ECMA-262, |
- // section 11.12, page 58. |
- Expression* left = ParseAssignmentExpression(true, CHECK_OK); |
- Expect(Token::COLON, CHECK_OK); |
- Expression* right = ParseAssignmentExpression(accept_IN, CHECK_OK); |
- return factory()->NewConditional(expression, left, right, pos); |
-} |
- |
- |
// Precedence >= 4 |
Expression* Parser::ParseBinaryExpression(int prec, bool accept_IN, bool* ok) { |
ASSERT(prec >= 4); |