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

Unified Diff: pkg/front_end/lib/src/fasta/builder/member_builder.dart

Issue 2691523002: Ensure locations are always provided, but don't store them yet. (Closed)
Patch Set: Address comments. 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
Index: pkg/front_end/lib/src/fasta/builder/member_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/member_builder.dart b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
index f4cb6f1bfeea797284ae45a77f49b587c2fbce50..fc63ed9023cea1c27ec51d7363363f04394e0dab 100644
--- a/pkg/front_end/lib/src/fasta/builder/member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
@@ -10,8 +10,14 @@ import 'builder.dart' show
ModifierBuilder;
abstract class MemberBuilder extends ModifierBuilder {
+ /// For top-level members, the parent is set correctly during
+ /// construction. However, for class members, the parent is initially the
+ /// library and updated later.
Builder parent;
+ MemberBuilder(Builder parent, int charOffset)
+ : parent = parent, super(parent, charOffset);
+
bool get isInstanceMember => isClassMember && !isStatic;
bool get isClassMember => parent is ClassBuilder;
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/library_builder.dart ('k') | pkg/front_end/lib/src/fasta/builder/metadata_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698