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

Unified Diff: pkg/analyzer/lib/src/fasta/ast_builder.dart

Issue 2948383002: Remove peeking from parseTypedef and parseClassOrNamedMixinApplication. (Closed)
Patch Set: Addressed comments and then some. Created 3 years, 6 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/lib/src/fasta/parser/identifier_context.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/fasta/ast_builder.dart
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index b3896c96a8727f1d38e1b56e7093a83ddf815c77..67f6f912af0e339720e44d3ba504f0c6f28e02e4 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -227,8 +227,6 @@ class AstBuilder extends ScopeListener {
assert(element != null);
identifier.staticElement = element;
}
- } else if (context == IdentifierContext.classDeclaration) {
- className = identifier.name;
}
push(identifier);
}
@@ -1337,6 +1335,12 @@ class AstBuilder extends ScopeListener {
beginToken, popList(memberCount) ?? <ClassMember>[], endToken));
}
+ @override
+ void beginClassDeclaration(Token beginToken, Token name) {
+ assert(className == null);
+ className = name.lexeme;
+ }
+
@override
void endClassDeclaration(
int interfacesCount,
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/parser/identifier_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698