1 package net.sourceforge.phpdt.internal.compiler.ast;
 
   7  * @author Matthieu Casanova
 
   9 public final class ReturnStatement extends Statement {
 
  11   private final 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    * @param list the list where we will put variables
 
  31   public void getOutsideVariable(final List list) {}
 
  34    * get the modified variables.
 
  36    * @param list the list where we will put variables
 
  38   public void getModifiedVariable(final List list) {
 
  39     if (expression != null) {
 
  40       expression.getModifiedVariable(list);
 
  45    * Get the variables used.
 
  47    * @param list the list where we will put variables
 
  49   public void getUsedVariable(final List list) {
 
  50     if (expression != null) {
 
  51         expression.getUsedVariable(list);