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

Unified Diff: pkg/fasta/lib/src/kernel/body_builder.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/parser.dart ('k') | pkg/fasta/test/compile.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/lib/src/kernel/body_builder.dart
diff --git a/pkg/fasta/lib/src/kernel/body_builder.dart b/pkg/fasta/lib/src/kernel/body_builder.dart
index 293aa100b93097e91caa6f6a03cfc19c65be3fe6..f8e63d1184c68b585843a2b6df3156ada00a0a5b 100644
--- a/pkg/fasta/lib/src/kernel/body_builder.dart
+++ b/pkg/fasta/lib/src/kernel/body_builder.dart
@@ -1678,6 +1678,17 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
exitLoopOrSwitch(result);
}
+ void beginForInExpression(Token token) {
+ enterLocalScope(scope.parent);
+ }
+
+ void endForInExpression(Token token) {
+ debugEvent("ForInExpression");
+ Expression expression = popForValue();
+ exitLocalScope();
+ push(expression ?? NullValue.Expression);
+ }
+
void endForIn(
Token awaitToken, Token forToken, Token inKeyword, Token endToken) {
debugEvent("ForIn");
« no previous file with comments | « pkg/dart_parser/lib/src/parser.dart ('k') | pkg/fasta/test/compile.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698