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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 96873002: Fix ElementVisitor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library elements; 5 library elements;
6 6
7 7
8 import '../tree/tree.dart'; 8 import '../tree/tree.dart';
9 import '../util/util.dart'; 9 import '../util/util.dart';
10 import '../resolution/resolution.dart'; 10 import '../resolution/resolution.dart';
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 Scope buildScope(); 254 Scope buildScope();
255 255
256 /// If the element is a forwarding constructor, [targetConstructor] holds 256 /// If the element is a forwarding constructor, [targetConstructor] holds
257 /// the generative constructor that the forwarding constructor points to 257 /// the generative constructor that the forwarding constructor points to
258 /// (possibly via other forwarding constructors). 258 /// (possibly via other forwarding constructors).
259 FunctionElement get targetConstructor; 259 FunctionElement get targetConstructor;
260 260
261 void diagnose(Element context, DiagnosticListener listener); 261 void diagnose(Element context, DiagnosticListener listener);
262 262
263 accept(ElementVisitor visitor) => visitor.visitElement(this); 263 accept(ElementVisitor visitor);
264 } 264 }
265 265
266 class Elements { 266 class Elements {
267 static bool isUnresolved(Element e) { 267 static bool isUnresolved(Element e) {
268 return e == null || e.isErroneous(); 268 return e == null || e.isErroneous();
269 } 269 }
270 static bool isErroneousElement(Element e) => e != null && e.isErroneous(); 270 static bool isErroneousElement(Element e) => e != null && e.isErroneous();
271 271
272 /// Unwraps [element] reporting any warnings attached to it, if any. 272 /// Unwraps [element] reporting any warnings attached to it, if any.
273 static Element unwrap(Element element, 273 static Element unwrap(Element element,
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 int get resolutionState; 987 int get resolutionState;
988 Token get beginToken; 988 Token get beginToken;
989 Token get endToken; 989 Token get endToken;
990 990
991 // TODO(kasperl): Try to get rid of these. 991 // TODO(kasperl): Try to get rid of these.
992 void set annotatedElement(Element value); 992 void set annotatedElement(Element value);
993 void set resolutionState(int value); 993 void set resolutionState(int value);
994 994
995 MetadataAnnotation ensureResolved(Compiler compiler); 995 MetadataAnnotation ensureResolved(Compiler compiler);
996 } 996 }
997
998 abstract class VoidElement extends Element {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698