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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartIdentifier.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 side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/ast/DartIdentifier.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartIdentifier.java b/compiler/java/com/google/dart/compiler/ast/DartIdentifier.java
index 4e9bcdbffab50d47a186b371d82234c161171812..11687a7ffba79cc42d40c3e49353f2b6cbf1b30e 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartIdentifier.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartIdentifier.java
@@ -4,30 +4,28 @@
package com.google.dart.compiler.ast;
-import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.resolver.Element;
/**
* Represents a Dart identifier expression.
*/
-public class DartIdentifier extends DartExpression implements ElementReference {
+public class DartIdentifier extends DartExpression {
- private final String targetName;
- private Element targetSymbol;
- private Element referencedElement;
+ private final String name;
+ private Element element;
- public DartIdentifier(String targetName) {
- assert targetName != null;
- this.targetName = targetName;
+ public DartIdentifier(String name) {
+ assert name != null;
+ this.name = name;
}
public DartIdentifier(DartIdentifier original) {
- this.targetName = original.targetName;
+ this.name = original.name;
}
@Override
- public Element getSymbol() {
- return targetSymbol;
+ public Element getElement() {
+ return element;
}
@Override
@@ -35,21 +33,13 @@ public class DartIdentifier extends DartExpression implements ElementReference {
return true;
}
- public String getTargetName() {
- return targetName;
- }
-
- /**
- * Different access from getSymbol() to help distinguish parts of an expression
- * when walking a DartPropertyAccess.
- */
- public Element getTargetSymbol() {
- return targetSymbol;
+ public String getName() {
+ return name;
}
@Override
- public void setSymbol(Symbol symbol) {
- this.targetSymbol = (Element) symbol;
+ public void setElement(Element element) {
+ this.element = (Element) element;
}
@Override
@@ -61,16 +51,6 @@ public class DartIdentifier extends DartExpression implements ElementReference {
return visitor.visitIdentifier(this);
}
- @Override
- public void setReferencedElement(Element element) {
- referencedElement = element;
- }
-
- @Override
- public Element getReferencedElement() {
- return referencedElement;
- }
-
public static boolean isPrivateName(String name) {
return name.startsWith("_");
}

Powered by Google App Engine
This is Rietveld 408576698