1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
7 * @author Matthieu Casanova
9 public class BinaryExpression extends OperatorExpression {
11 /** The two expressions. */
12 public Expression left,right;
14 public BinaryExpression(final Expression left,
15 final Expression right,
17 super(operator, left.getSourceStart(), right.getSourceEnd());
22 public String toStringExpression() {
23 final StringBuffer buff = new StringBuffer(left.toStringExpression());
24 buff.append(operatorToString());
25 buff.append(right.toStringExpression());
26 return buff.toString();
30 * Get the variables from outside (parameters, globals ...)
31 * @return the variables from outside
33 public List getOutsideVariable() {
34 return new ArrayList();
38 * get the modified variables.
39 * @return the variables from we change value
41 public List getModifiedVariable() {
42 final ArrayList list = new ArrayList();
43 list.addAll(left.getModifiedVariable());
44 list.addAll(right.getModifiedVariable());
49 * Get the variables used.
50 * @return the variables used
52 public List getUsedVariable() {
53 final ArrayList list = new ArrayList();
54 list.addAll(left.getUsedVariable());
55 list.addAll(right.getUsedVariable());