1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
8 * @author Matthieu Casanova
10 public class ReturnStatement extends Statement {
12 public Expression expression;
14 public ReturnStatement(final Expression expression, final int sourceStart, final int sourceEnd) {
15 super(sourceStart, sourceEnd);
16 this.expression = expression;
19 public String toString(final int tab) {
20 final String s = tabString(tab);
21 if (expression == null) {
22 return s + "return";//$NON-NLS-1$
24 return s + "return " + expression.toStringExpression();//$NON-NLS-1$
28 * Get the variables from outside (parameters, globals ...)
29 * @return the variables from outside
31 public List getOutsideVariable() {
32 return new ArrayList();
36 * get the modified variables.
37 * @return the variables modified
39 public List getModifiedVariable() {
40 if (expression == null) {
41 return new ArrayList();
43 return expression.getModifiedVariable();
47 * Get the variables used.
48 * @return the variables used
50 public List getUsedVariable() {
51 if (expression == null) {
52 return new ArrayList();
54 return expression.getUsedVariable();