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

Unified Diff: src/parser.cc

Issue 197353003: Move ParseYieldExpression to ParserBase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 845e9201d3d848a7f2bc1f88ce02dda3c53abb3d..48d8fffef7c86a9c055cce110bc69668d48df03b 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -638,11 +638,6 @@ FunctionLiteral* ParserTraits::ParseFunctionLiteral(
}
-Expression* ParserTraits::ParseYieldExpression(bool* ok) {
- return parser_->ParseYieldExpression(ok);
-}
-
-
Expression* ParserTraits::ParseConditionalExpression(bool accept_IN, bool* ok) {
return parser_->ParseConditionalExpression(accept_IN, ok);
}
@@ -2935,24 +2930,6 @@ Statement* Parser::ParseForStatement(ZoneStringList* labels, bool* ok) {
}
-Expression* Parser::ParseYieldExpression(bool* ok) {
- // YieldExpression ::
- // 'yield' '*'? AssignmentExpression
- int pos = peek_position();
- Expect(Token::YIELD, CHECK_OK);
- Yield::Kind kind =
- Check(Token::MUL) ? Yield::DELEGATING : Yield::SUSPEND;
- Expression* generator_object = factory()->NewVariableProxy(
- function_state_->generator_object_variable());
- Expression* expression = ParseAssignmentExpression(false, CHECK_OK);
- Yield* yield = factory()->NewYield(generator_object, expression, kind, pos);
- if (kind == Yield::DELEGATING) {
- yield->set_index(function_state_->NextHandlerIndex());
- }
- return yield;
-}
-
-
// Precedence = 3
Expression* Parser::ParseConditionalExpression(bool accept_IN, bool* ok) {
// ConditionalExpression ::
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698