1 package net.sourceforge.phpdt.internal.compiler.ast;
4 * @author Matthieu Casanova
6 public class IfStatement extends Statement {
8 public Expression condition;
9 public ElseIf[] elseifs;
12 public IfStatement(Expression condition,
17 super(sourceStart, sourceEnd);
18 this.condition = condition;
19 this.elseifs = elseifs;
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));
31 buff.append(condition.toStringExpression()).append(") ");
32 for (int i = 0; i < elseifs.length; i++) {
33 ElseIf elseif = elseifs[i];
34 buff.append(elseif.toString(tab+1));
38 buff.append(els.toString(tab+1));
41 return buff.toString();