1 package net.sourceforge.phpdt.internal.compiler.ast;
4 * A variable declaration.
5 * @author Matthieu Casanova
7 public class VariableDeclaration extends AbstractVariableDeclaration {
9 /** The value for variable initialization. */
10 public Expression initialization;
14 * @param initialization the initialization
15 * @param name the name
16 * @param sourceStart the start point
17 * @param sourceEnd the end point
19 public VariableDeclaration(Expression initialization,
23 this.initialization = initialization;
25 //due to some declaration like
26 // int x, y = 3, z , x ;
27 //the sourceStart and the sourceEnd is ONLY on the name
28 this.sourceStart = sourceStart;
29 this.sourceEnd = sourceEnd;
32 public String toString(int tab) {
33 String s = tabString(tab);
34 if (initialization != null) {
35 s += " = " + initialization.toStringExpression(tab); //$NON-NLS-1$