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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartFunctionExpression.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/DartFunctionExpression.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartFunctionExpression.java b/compiler/java/com/google/dart/compiler/ast/DartFunctionExpression.java
index bf0817bb61d26fd40c70bb4b9f0c0ff65786c265..7362ee292d8a334cec2023e96cfa86cb30d781c9 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartFunctionExpression.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartFunctionExpression.java
@@ -4,21 +4,20 @@
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.MethodElement;
/**
* Represents a Dart 'function' expression.
*/
-public class DartFunctionExpression extends DartExpression implements HasSymbol {
+public class DartFunctionExpression extends DartExpression {
// Not visited. Similar to DartDeclaration, but DartDeclaration shouldn't be
// a statement or an expression.
private DartIdentifier name;
private final boolean isStmt;
- private MethodElement symbol;
+ private MethodElement element;
private DartFunction function;
public DartFunctionExpression(DartIdentifier name, DartFunction function, boolean isStmt) {
@@ -35,7 +34,7 @@ public class DartFunctionExpression extends DartExpression implements HasSymbol
if (name == null) {
return null;
}
- return name.getTargetName();
+ return name.getName();
}
public DartIdentifier getName() {
@@ -43,8 +42,8 @@ public class DartFunctionExpression extends DartExpression implements HasSymbol
}
@Override
- public MethodElement getSymbol() {
- return symbol;
+ public MethodElement getElement() {
+ return element;
}
public boolean isStatement() {
@@ -56,8 +55,8 @@ public class DartFunctionExpression extends DartExpression implements HasSymbol
}
@Override
- public void setSymbol(Symbol symbol) {
- this.symbol = (MethodElement) symbol;
+ public void setElement(Element element) {
+ this.element = (MethodElement) element;
}
@Override

Powered by Google App Engine
This is Rietveld 408576698