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

Unified Diff: runtime/vm/parser.h

Issue 507233002: Fix conditionally parsing await as keyword. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix typo Created 6 years, 4 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 | « no previous file | 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
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 3994aaae54d07806098d2c0be45074a6575cb279..d249655e9947fd59f05c10031ed9d09a4c967015 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -342,6 +342,7 @@ class Parser : public ValueObject {
String* ExpectUserDefinedTypeIdentifier(const char* msg);
String* ExpectIdentifier(const char* msg);
bool IsLiteral(const char* literal);
+ bool IsAwaitAsKeyword();
void SkipIf(Token::Kind);
void SkipBlock();
@@ -773,6 +774,10 @@ class Parser : public ValueObject {
// 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.
+ bool await_is_keyword_;
+
// The member currently being parsed during "top level" parsing.
MemberDesc* current_member_;
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698