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

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

Issue 9288021: Issue 1287. Allow to invoke function literal. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More tests, check for function name. Created 8 years, 11 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/DartReturnBlock.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java b/compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java
new file mode 100644
index 0000000000000000000000000000000000000000..0c6dbed811cfe07358ac644a4dfbc4de0f36a743
--- /dev/null
+++ b/compiler/java/com/google/dart/compiler/ast/DartReturnBlock.java
@@ -0,0 +1,15 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package com.google.dart.compiler.ast;
+
+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)));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698