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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.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/DartPropertyAccess.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java b/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java
index cab19149270dc8b51a19d76c55573d11697d13e3..c19e722544e8d8eaa577a2d2d936be78a7e989d8 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartPropertyAccess.java
@@ -4,18 +4,16 @@
package com.google.dart.compiler.ast;
-import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.resolver.Element;
import com.google.dart.compiler.type.Type;
/**
* Represents a Dart property access expression (a.b).
*/
-public class DartPropertyAccess extends DartExpression implements ElementReference {
+public class DartPropertyAccess extends DartExpression {
private DartNode qualifier;
private DartIdentifier name;
- private Element referencedElement;
private Type type;
public DartPropertyAccess(DartNode qualifier, DartIdentifier name) {
@@ -29,7 +27,7 @@ public class DartPropertyAccess extends DartExpression implements ElementReferen
}
public String getPropertyName() {
- return name.getTargetName();
+ return name.getName();
}
public DartIdentifier getName() {
@@ -45,12 +43,13 @@ public class DartPropertyAccess extends DartExpression implements ElementReferen
}
@Override
- public void setSymbol(Symbol symbol) {
- name.setSymbol(symbol);
+ public void setElement(Element element) {
+ name.setElement(element);
}
- public Element getTargetSymbol() {
- return name.getTargetSymbol();
+ @Override
+ public Element getElement() {
+ return name.getElement();
}
@Override
@@ -73,14 +72,4 @@ public class DartPropertyAccess extends DartExpression implements ElementReferen
public <R> R accept(ASTVisitor<R> visitor) {
return visitor.visitPropertyAccess(this);
}
-
- @Override
- public Element getReferencedElement() {
- return referencedElement;
- }
-
- @Override
- public void setReferencedElement(Element element) {
- referencedElement = element;
- }
}

Powered by Google App Engine
This is Rietveld 408576698