1 package net.sourceforge.phpdt.internal.compiler.ast;
 
   5  * This is a variable declaration for a php class
 
   6  * In fact it's an array of VariableDeclaration, since a field could contains
 
   9  * @author Matthieu Casanova
 
  11 public class FieldDeclaration extends Statement {
 
  14   public VariableDeclaration[] vars;
 
  18    * @param vars the array of variables.
 
  19    * @param sourceStart the starting offset
 
  20    * @param sourceEnd   the ending offset
 
  22   public FieldDeclaration(VariableDeclaration[] vars, int sourceStart, int sourceEnd) {
 
  23     super(sourceStart, sourceEnd);
 
  28    * Return the object into String.
 
  29    * @param tab how many tabs (not used here
 
  32   public String toString(int tab) {
 
  33     final StringBuffer buff = new StringBuffer(tabString(tab));
 
  34     buff.append("var ");//$NON-NLS-1$
 
  35     for (int i = 0; i < vars.length; i++) {
 
  36       VariableDeclaration var = vars[i];
 
  38         buff.append(',');//$NON-NLS-1$
 
  40       buff.append(var.toStringExpression());
 
  42     return buff.toString();