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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartVariable.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/DartVariable.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartVariable.java b/compiler/java/com/google/dart/compiler/ast/DartVariable.java
index dd328cb8d4aee6e53a4fe5d82da3f41e656d499a..37709e67e90a7dbc8646929f733fb1b7259f68cd 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartVariable.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartVariable.java
@@ -4,16 +4,15 @@
package com.google.dart.compiler.ast;
-import com.google.dart.compiler.common.HasSymbol;
-import com.google.dart.compiler.common.Symbol;
import com.google.dart.compiler.resolver.Element;
+import com.google.dart.compiler.resolver.VariableElement;
/**
* Represents a single variable declaration in a {@link DartVariableStatement}.
*/
-public class DartVariable extends DartDeclaration<DartIdentifier> implements HasSymbol {
+public class DartVariable extends DartDeclaration<DartIdentifier> {
- private Element symbol;
+ private VariableElement element;
private DartExpression value;
@@ -23,12 +22,12 @@ public class DartVariable extends DartDeclaration<DartIdentifier> implements Has
}
public String getVariableName() {
- return getName().getTargetName();
+ return getName().getName();
}
@Override
- public Element getSymbol() {
- return symbol;
+ public VariableElement getElement() {
+ return element;
}
public DartExpression getValue() {
@@ -36,8 +35,8 @@ public class DartVariable extends DartDeclaration<DartIdentifier> implements Has
}
@Override
- public void setSymbol(Symbol symbol) {
- this.symbol = (Element) symbol;
+ public void setElement(Element element) {
+ this.element = (VariableElement) element;
}
@Override

Powered by Google App Engine
This is Rietveld 408576698