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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java

Issue 10818028: Convert into/from => function syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java b/compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java
index a47bb20e0b5d1f3ba30e42e7438fb2bf0e86ccc4..2ab69ce540bf15a420c36b5177ef3b28ad1ad2b8 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java
@@ -9,14 +9,21 @@ import com.google.common.collect.Lists;
* Represents a Dart block containing a single return statement.
*/
public class DartReturnBlock extends DartBlock {
- public DartReturnBlock(DartExpression returnVal) {
- super(Lists.<DartStatement> newArrayList(new DartReturnStatement(returnVal)));
+ private final DartExpression value;
+
+ public DartReturnBlock(DartExpression value) {
+ super(Lists.<DartStatement> newArrayList(new DartReturnStatement(value)));
+ this.value = value;
// Set the source information for the synthesized node.
- getStatements().get(0).setSourceInfo(returnVal.getSourceInfo());
+ getStatements().get(0).setSourceInfo(value.getSourceInfo());
}
@Override
public <R> R accept(ASTVisitor<R> visitor) {
return visitor.visitReturnBlock(this);
}
+
+ public DartExpression getValue() {
+ return value;
+ }
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698