Some minor changes
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / BranchStatement.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 import java.util.List;
4
5 /**
6  * Here is a branchstatement : break or continue.
7  * @author Matthieu Casanova
8  */
9 public abstract class BranchStatement extends Statement {
10
11   /** The label (if there is one). */
12   protected final Expression expression;
13
14   protected BranchStatement(final Expression expression, final int sourceStart, final int sourceEnd) {
15     super(sourceStart, sourceEnd);
16     this.expression = expression;
17   }
18
19   /**
20    * Get the variables from outside (parameters, globals ...)
21    *
22    * @param list the list where we will put variables
23    */
24   public final void getOutsideVariable(final List list) {
25     if (expression != null) {
26       expression.getOutsideVariable(list);
27     }
28   }
29
30   /**
31    * get the modified variables.
32    *
33    * @param list the list where we will put variables
34    */
35   public final void getModifiedVariable(final List list) {
36     if (expression != null) {
37     expression.getModifiedVariable(list);
38     }
39   }
40
41   /**
42    * Get the variables used.
43    *
44    * @param list the list where we will put variables
45    */
46   public final void getUsedVariable(final List list) {
47     if (expression != null) {
48       expression.getUsedVariable(list);
49     }
50   }
51 }