86d5d7e43a468aafa04eeab99ed04535846e8f92
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / PrintExpression.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 import java.util.List;
4 import java.util.ArrayList;
5
6 /**
7  * @author Matthieu Casanova
8  */
9 public class PrintExpression extends Expression {
10
11   public Expression expression;
12
13   public PrintExpression(final Expression expression, final int sourceStart, final int sourceEnd) {
14     super(sourceStart, sourceEnd);
15     this.expression = expression;
16   }
17
18   /**
19    * Return the expression as String.
20    * @return the expression
21    */
22   public String toStringExpression() {
23     return "print " + expression.toStringExpression();
24   }
25
26   /**
27    * Get the variables from outside (parameters, globals ...)
28    * @return the variables from outside
29    */
30   public List getOutsideVariable() {
31     return expression.getOutsideVariable();
32   }
33
34   /**
35    * get the modified variables.
36    * @return the variables from we change value
37    */
38   public List getModifiedVariable() {
39     return expression.getModifiedVariable();
40   }
41
42   /**
43    * Get the variables used.
44    * @return the variables used
45    */
46   public List getUsedVariable() {
47     return expression.getUsedVariable();
48   }
49 }