1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
7 * @author Matthieu Casanova
9 public class ArrayDeclarator extends AbstractVariable {
11 public AbstractVariable prefix;
12 public Expression var;
14 public ArrayDeclarator(final AbstractVariable prefix,
15 final Expression vars,
16 final int sourceEnd) {
17 super(prefix.sourceStart, sourceEnd);
23 * Return the expression as String.
24 * @return the expression
26 public String toStringExpression() {
27 final StringBuffer buff = new StringBuffer(prefix.toStringExpression());
30 buff.append(var.toStringExpression());
33 return buff.toString();
37 * Return the name of the variable.
38 * @return the name of the functionName variable
40 public String getName() {
41 return prefix.getName();
45 * Get the variables from outside (parameters, globals ...)
47 public void getOutsideVariable(final List list) {
51 * get the modified variables.
53 public void getModifiedVariable(final List list) {
54 prefix.getModifiedVariable(list);
56 var.getModifiedVariable(list);
61 * Get the variables used.
63 public void getUsedVariable(final List list) {
64 prefix.getUsedVariable(list);
66 var.getUsedVariable(list);