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

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

Issue 2689793002: Track names in DeclarationBuilder. (Closed)
Patch Set: 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 | « pkg/front_end/lib/src/fasta/source/outline_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/source/source_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 35fa0f45d27667445557533a5060f5dc88ff8266..9174707dbd3bf35e239e8a22d70b57be20fc994c 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -112,9 +112,9 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
return ref;
}
- void beginNestedDeclaration({bool hasMembers}) {
+ void beginNestedDeclaration(String name, {bool hasMembers}) {
currentDeclaration =
- new DeclarationBuilder(<String, MemberBuilder>{}, currentDeclaration);
+ new DeclarationBuilder(<String, MemberBuilder>{}, name, currentDeclaration);
}
DeclarationBuilder<T> endNestedDeclaration() {
@@ -179,7 +179,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
int modifiers, T returnType, String name,
List<TypeVariableBuilder> typeVariables,
List<FormalParameterBuilder> formals, AsyncMarker asyncModifier,
- ProcedureKind kind, int charOffset);
+ ProcedureKind kind, int charOffset, {bool isTopLevel});
void addEnum(List<MetadataBuilder> metadata, String name,
List<String> constants, int charOffset);
@@ -370,7 +370,9 @@ class DeclarationBuilder<T extends TypeBuilder> {
final List<T> types = <T>[];
- DeclarationBuilder(this.members, [this.parent]);
+ final String name;
+
+ DeclarationBuilder(this.members, this.name, [this.parent]);
void addMember(String name, MemberBuilder builder) {
if (members == null) {
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/outline_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698