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

Unified Diff: runtime/vm/parser.cc

Issue 2193113002: Set correct token position range for statement block containing moveNext call of (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 1b7cec334caab0980f4f066e7dbfebee28454909..99b7fcb9831619356059c8bfd5ff7e562ad7de66 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -9028,13 +9028,14 @@ AstNode* Parser::ParseForInStatement(TokenPosition forin_pos,
loop_var_name = ExpectIdentifier("variable name expected");
}
ExpectToken(Token::kIN);
+
+ OpenBlock(); // Implicit block around while loop.
hausner 2016/07/29 17:59:35 Maybe add a comment that explains why we open a bl
regis 2016/07/29 21:31:47 Done.
+
const TokenPosition collection_pos = TokenPos();
AstNode* collection_expr =
ParseAwaitableExpr(kAllowConst, kConsumeCascades, NULL);
ExpectToken(Token::kRPAREN);
- OpenBlock(); // Implicit block around while loop.
-
// Generate implicit iterator variable and add to scope.
// We could set the type of the implicit iterator variable to Iterator<T>
// where T is the type of the for loop variable. However, the type error
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698