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

Unified Diff: runtime/vm/parser.h

Issue 888463004: Add support for sync* and yield (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 43515)
+++ runtime/vm/parser.h (working copy)
@@ -345,6 +345,7 @@
String* ExpectIdentifier(const char* msg);
bool IsLiteral(const char* literal);
bool IsAwaitKeyword();
+ bool IsYieldKeyword();
void SkipIf(Token::Kind);
void SkipBlock();
@@ -558,12 +559,18 @@
void OpenFunctionBlock(const Function& func);
void OpenAsyncClosure();
RawFunction* OpenAsyncFunction(intptr_t formal_param_pos);
+ RawFunction* OpenSyncGeneratorFunction(intptr_t func_pos);
+ SequenceNode* CloseSyncGenFunction(const Function& closure,
+ SequenceNode* closure_node);
+ void AddSyncGenClosureParameters(ParamList* params);
void OpenAsyncTryBlock();
SequenceNode* CloseBlock();
SequenceNode* CloseAsyncFunction(const Function& closure,
SequenceNode* closure_node);
SequenceNode* CloseAsyncClosure(SequenceNode* body);
SequenceNode* CloseAsyncTryBlock(SequenceNode* try_block);
+ void AddAsyncClosureParameters(ParamList* params);
+ void AddContinuationVariables();
void AddAsyncClosureVariables();
@@ -786,8 +793,9 @@
// global variables.
bool is_top_level_;
- // await_is_keyword_ is true if we are parsing an async function. In this
- // context async is not treated as identifier but as a keyword.
+ // await_is_keyword_ is true if we are parsing an async or generator
+ // function. In this context the identifiers await, async and yield
+ // are treated as keywords.
bool await_is_keyword_;
// The member currently being parsed during "top level" parsing.
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698