1 package net.sourceforge.phpdt.internal.compiler.ast;
3 import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
6 import java.util.ArrayList;
10 * @author Matthieu Casanova
12 public class ReturnStatement extends Statement {
14 public Expression expression;
16 public ReturnStatement(final Expression expression, final int sourceStart, final int sourceEnd) {
17 super(sourceStart, sourceEnd);
18 this.expression = expression;
21 public String toString(final int tab) {
22 final String s = tabString(tab);
23 if (expression == null) {
24 return s + "return";//$NON-NLS-1$
26 return s + "return " + expression.toStringExpression();//$NON-NLS-1$
30 * Get the variables from outside (parameters, globals ...)
31 * @return the variables from outside
33 public List getOutsideVariable() {
34 return new ArrayList();
38 * get the modified variables.
39 * @return the variables modified
41 public List getModifiedVariable() {
42 return expression.getModifiedVariable();
46 * Get the variables used.
47 * @return the variables used
49 public List getUsedVariable() {
50 return expression.getUsedVariable();