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

Unified Diff: pkg/compiler/lib/src/scanner/parser.dart

Issue 886833005: Fix await parsing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added comment Created 5 years, 11 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 | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/scanner/parser.dart
diff --git a/pkg/compiler/lib/src/scanner/parser.dart b/pkg/compiler/lib/src/scanner/parser.dart
index e398dd7c8d6f8da3cdd295152d2ec6ea698e10fd..fb4919661152492a143c82a3f265931da1f2f4b9 100644
--- a/pkg/compiler/lib/src/scanner/parser.dart
+++ b/pkg/compiler/lib/src/scanner/parser.dart
@@ -41,10 +41,11 @@ class FormalParameterType {
class Parser {
final Listener listener;
bool mayParseFunctionExpressions = true;
- bool yieldIsKeyword = false;
- bool awaitIsKeyword = false;
+ bool yieldIsKeyword;
+ bool awaitIsKeyword;
- Parser(this.listener);
+ Parser(this.listener,
+ {this.yieldIsKeyword: false, this.awaitIsKeyword: false});
Token parseUnit(Token token) {
listener.beginCompilationUnit(token);
@@ -2472,7 +2473,8 @@ class Parser {
Token awaitToken = token;
listener.beginAwaitExpression(awaitToken);
token = expect('await', token);
- token = parseUnaryExpression(token, allowCascades);
+ token = parsePrecedenceExpression(token, POSTFIX_PRECEDENCE,
+ allowCascades);
listener.endAwaitExpression(awaitToken, token);
return token;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698