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

Unified Diff: pkg/front_end/lib/src/fasta/source/diet_listener.dart

Issue 2723513002: Always provide a field for context. (Closed)
Patch Set: Update status files. Created 3 years, 10 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/front_end/test/fasta/bootstrap_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/source/diet_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index 780d617265f8ac2055a326b51eeb4808af9bfc55..ac7e74f78de0824c22ddf4d6fb897aff07869295 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -182,7 +182,7 @@ class DietListener extends StackListener {
debugEvent("Fields");
List<String> names = popList(count);
Builder builder = lookupBuilder(beginToken, null, names.first);
- buildFields(beginToken, false, builder.isInstanceMember);
+ buildFields(beginToken, false, builder);
}
@override
@@ -207,8 +207,9 @@ class DietListener extends StackListener {
@override
void endTopLevelFields(int count, Token beginToken, Token endToken) {
debugEvent("TopLevelFields");
- discard(count);
- buildFields(beginToken, true, false);
+ List<String> names = popList(count);
+ Builder builder = lookupBuilder(beginToken, null, names.first);
+ buildFields(beginToken, true, builder);
}
@override
@@ -405,9 +406,9 @@ class DietListener extends StackListener {
token);
}
- void buildFields(Token token, bool isTopLevel, bool isInstanceMember) {
- parseFields(
- createListener(null, memberScope, isInstanceMember), token, isTopLevel);
+ void buildFields(Token token, bool isTopLevel, MemberBuilder builder) {
+ parseFields(createListener(builder, memberScope, builder.isInstanceMember),
+ token, isTopLevel);
}
@override
« no previous file with comments | « no previous file | pkg/front_end/test/fasta/bootstrap_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698