package net.sourceforge.phpdt.internal.compiler.ast; /** * This variable declaration do not extend AbstractVariableDeclaration because * it could take Expression as key * @author Matthieu Casanova */ public class ArrayVariableDeclaration extends Expression { public Expression key,value; public ArrayVariableDeclaration(Expression key,Expression value) { super(key.sourceStart, value.sourceEnd); this.key = key; this.value = value; } /** * Return the expression as String. * @return the expression */ public String toStringExpression() { final StringBuffer buff = new StringBuffer(); buff.append(key.toStringExpression()); if (value != null) { buff.append(" => "); buff.append(value.toStringExpression()); } return buff.toString(); } }