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

Unified Diff: src/parser.h

Issue 12646003: Add parser support for generators. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Finish parser, build AST, add tests Created 7 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
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 0f85f91583b161ceab4d80d6cd81b570f144f6d9..54b6ad7f85a712dc17cbf946c00dd709aaf67ad3 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -636,6 +636,7 @@ class Parser {
Expression* ParseExpression(bool accept_IN, bool* ok);
Expression* ParseAssignmentExpression(bool accept_IN, bool* ok);
+ Expression* ParseYieldExpression(bool* ok);
Expression* ParseConditionalExpression(bool accept_IN, bool* ok);
Expression* ParseBinaryExpression(int prec, bool accept_IN, bool* ok);
Expression* ParseUnaryExpression(bool* ok);
@@ -679,6 +680,7 @@ class Parser {
ZoneList<Expression*>* ParseArguments(bool* ok);
FunctionLiteral* ParseFunctionLiteral(Handle<String> var_name,
bool name_is_reserved,
+ bool is_generator,
int function_token_position,
FunctionLiteral::Type type,
bool* ok);
@@ -708,6 +710,8 @@ class Parser {
return scanner().Next();
}
+ bool inside_generator() const { return top_scope_->inside_generator(); }
Michael Starzinger 2013/03/14 22:29:24 See comment in ParseIdentifier(), I think we shoul
+
bool peek_any_identifier();
INLINE(void Consume(Token::Value token));

Powered by Google App Engine
This is Rietveld 408576698