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

Unified Diff: src/parser.h

Issue 13179002: Add parser support for generators. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: added additional syntax 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
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 6dcf7f129faa021e9f0d332a44c92ea3a7517aa2..f4672925cbfb2d0b76f4c35b45075e60ae18b094 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -631,6 +631,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);
@@ -674,6 +675,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);
@@ -703,6 +705,8 @@ class Parser {
return scanner().Next();
}
+ bool inside_generator() const { return top_scope_->inside_generator(); }
+
bool peek_any_identifier();
INLINE(void Consume(Token::Value token));
« no previous file with comments | « src/objects-inl.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698