X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java index ea695e4..ff4a838 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ReturnStatement.java @@ -1,22 +1,49 @@ package net.sourceforge.phpdt.internal.compiler.ast; +import java.util.List; + /** + * A return statement. * @author Matthieu Casanova */ public class ReturnStatement extends Statement { public Expression expression; - public ReturnStatement(Expression expression, int sourceStart, int sourceEnd) { + public ReturnStatement(final Expression expression, final int sourceStart, final int sourceEnd) { super(sourceStart, sourceEnd); this.expression = expression; } - public String toString(int tab) { + public String toString(final int tab) { final String s = tabString(tab); if (expression == null) { - return s + "return " + expression.toStringExpression(); + return s + "return";//$NON-NLS-1$ + } + return s + "return " + expression.toStringExpression();//$NON-NLS-1$ + } + + /** + * Get the variables from outside (parameters, globals ...) + */ + public void getOutsideVariable(final List list) { + } + + /** + * get the modified variables. + */ + public void getModifiedVariable(final List list) { + if (expression != null) { + expression.getModifiedVariable(list); + } + } + + /** + * Get the variables used. + */ + public void getUsedVariable(final List list) { + if (expression != null) { + expression.getUsedVariable(list); } - return s + "return"; } }