1 package net.sourceforge.phpdt.internal.compiler.ast;
4 * @author Matthieu Casanova
6 public class ForeachStatement extends Statement {
8 public Expression expression;
9 public Expression variable;
10 public Statement statement;
12 public ForeachStatement(Expression expression,
17 super(sourceStart, sourceEnd);
18 this.expression = expression;
19 this.variable = variable;
20 this.statement = statement;
24 * Return the object into String.
25 * @param tab how many tabs (not used here
28 public String toString(int tab) {
29 final StringBuffer buff = new StringBuffer(tabString(tab));
30 buff.append("foreach (");
31 buff.append(expression.toStringExpression());
33 buff.append(variable.toStringExpression());
35 buff.append(statement.toString(tab+1));
37 return buff.toString();