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

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

Issue 2967903003: Add names to nested declaration to ease debugging. (Closed)
Patch Set: Created 3 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 | « 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 a21b00c8c8d86f4abd710dbd7bb3bd19c64492a6..1583ab9e0f10b238dcf714d9ae954b1ec53aaee2 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
@@ -120,7 +120,12 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
currentDeclaration = currentDeclaration.createNested(name, hasMembers);
}
- DeclarationBuilder<T> endNestedDeclaration() {
+ DeclarationBuilder<T> endNestedDeclaration(String name) {
+ assert(
+ (name?.startsWith(currentDeclaration.name) ??
+ (name == currentDeclaration.name)) ||
+ currentDeclaration.name == "operator",
+ "${name} != ${currentDeclaration.name}");
DeclarationBuilder<T> previous = currentDeclaration;
currentDeclaration = currentDeclaration.parent;
return previous;
« 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