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

Side by Side Diff: compiler/java/com/google/dart/compiler/ast/DartDeclaration.java

Issue 9633009: Use Element instead of Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 package com.google.dart.compiler.ast; 5 package com.google.dart.compiler.ast;
6 6
7 import com.google.dart.compiler.resolver.Element;
8 7
9 /** 8 /**
10 * Common supertype for most declarations. A declaration introduces a new name 9 * Common supertype for most declarations. A declaration introduces a new name
11 * in a scope. Certain tools, such as the IDE, need to know the location of this 10 * in a scope. Certain tools, such as the IDE, need to know the location of this
12 * name, but the name should otherwise be considered a part of the declaration, 11 * name, but the name should otherwise be considered a part of the declaration,
13 * not an independent node. So the name is not visited when traversing the AST. 12 * not an independent node. So the name is not visited when traversing the AST.
14 */ 13 */
15 public abstract class DartDeclaration<N extends DartExpression> extends DartNode { 14 public abstract class DartDeclaration<N extends DartExpression> extends DartNode {
16 15
17 private N name; // Not visited. 16 private N name; // Not visited.
18 private DartComment dartDoc; 17 private DartComment dartDoc;
19 18
20 protected DartDeclaration(N name) { 19 protected DartDeclaration(N name) {
21 this.name = becomeParentOf(name); 20 this.name = becomeParentOf(name);
22 } 21 }
23 22
24 public final N getName() { 23 public final N getName() {
25 return name; 24 return name;
26 } 25 }
27 26
28 public final void setName(N newName) { 27 public final void setName(N newName) {
29 name = becomeParentOf(newName); 28 name = becomeParentOf(newName);
30 } 29 }
31 30
32 @Override
33 public abstract Element getSymbol();
34
35 public DartComment getDartDoc() { 31 public DartComment getDartDoc() {
36 return dartDoc; 32 return dartDoc;
37 } 33 }
38 34
39 public void setDartDoc(DartComment dartDoc) { 35 public void setDartDoc(DartComment dartDoc) {
40 // dartDoc is still parented by the containing DartUnit. 36 // dartDoc is still parented by the containing DartUnit.
41 this.dartDoc = dartDoc; 37 this.dartDoc = dartDoc;
42 } 38 }
43 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698