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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 96623004: Add a visitor for Elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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: sdk/lib/_internal/compiler/implementation/elements/elements.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 52c6b30d51b9c933f4422929e223c4251f4bcc68..d1df2901056a2f0d85675eefc7d3cb9b7f262760 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -30,6 +30,8 @@ import '../scanner/scannerlib.dart' show Token,
import '../ordered_typeset.dart' show OrderedTypeSet;
+import 'visitor.dart' show ElementVisitor;
+
const int STATE_NOT_STARTED = 0;
const int STATE_STARTED = 1;
const int STATE_DONE = 2;
@@ -257,6 +259,8 @@ abstract class Element implements Spannable {
FunctionElement get targetConstructor;
void diagnose(Element context, DiagnosticListener listener);
+
+ accept(ElementVisitor visitor) => visitor.visitElement(this);
ahe 2013/11/29 11:44:50 Shouldn't this just be an abstract method?
sigurdm 2013/11/29 12:29:52 Yes
}
class Elements {

Powered by Google App Engine
This is Rietveld 408576698