1 package net.sourceforge.phpdt.internal.compiler.ast;
7 * @author Matthieu Casanova
9 public class ReturnStatement extends Statement {
11 public Expression expression;
13 public ReturnStatement(final Expression expression, final int sourceStart, final int sourceEnd) {
14 super(sourceStart, sourceEnd);
15 this.expression = expression;
18 public String toString(final int tab) {
19 final String s = tabString(tab);
20 if (expression == null) {
21 return s + "return";//$NON-NLS-1$
23 return s + "return " + expression.toStringExpression();//$NON-NLS-1$
27 * Get the variables from outside (parameters, globals ...)
29 public void getOutsideVariable(final List list) {
33 * get the modified variables.
35 public void getModifiedVariable(final List list) {
36 if (expression != null) {
37 expression.getModifiedVariable(list);
42 * Get the variables used.
44 public void getUsedVariable(final List list) {
45 if (expression != null) {
46 expression.getUsedVariable(list);