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

Unified Diff: pkg/dart_parser/lib/src/parser.dart

Issue 2642713002: Implement correct scope of for-in expression. (Closed)
Patch Set: Add comment to status files. Created 3 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 | « pkg/dart_parser/lib/src/listener.dart ('k') | pkg/fasta/lib/src/kernel/body_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dart_parser/lib/src/parser.dart
diff --git a/pkg/dart_parser/lib/src/parser.dart b/pkg/dart_parser/lib/src/parser.dart
index 783abc0ca48dd5c35cbb355fd5e018b8566e6382..a886e1493a13511c4f1f3b0d3309c038af3caa92 100644
--- a/pkg/dart_parser/lib/src/parser.dart
+++ b/pkg/dart_parser/lib/src/parser.dart
@@ -2772,7 +2772,10 @@ class Parser {
Token parseForInRest(Token awaitToken, Token forToken, Token token) {
assert(optional('in', token));
Token inKeyword = token;
- token = parseExpression(token.next);
+ token = token.next;
+ listener.beginForInExpression(token);
+ token = parseExpression(token);
+ listener.endForInExpression(token);
token = expect(')', token);
listener.beginForInBody(token);
token = parseStatement(token);
« no previous file with comments | « pkg/dart_parser/lib/src/listener.dart ('k') | pkg/fasta/lib/src/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698