+++ /dev/null
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author Matthieu Casanova
- */
-public class ArrayInitializer extends Expression {
-
- public ArrayVariableDeclaration[] vars;
-
- public ArrayInitializer(final ArrayVariableDeclaration[] vars,
- final int sourceStart,
- final int sourceEnd) {
- super(sourceStart, sourceEnd);
- this.vars = vars;
- }
-
- /**
- * Return the expression as String.
- * @return the expression
- */
- public String toStringExpression() {
- final StringBuffer buff = new StringBuffer("array(");
- for (int i = 0; i < vars.length; i++) {
- final ArrayVariableDeclaration var = vars[i];
- if (i != 0) {
- buff.append(",");
- }
- buff.append(var.toStringExpression());
- }
- buff.append(")");
- return buff.toString();
- }
-
- /**
- * Get the variables from outside (parameters, globals ...)
- * @return the variables from outside
- */
- public List getOutsideVariable() {
- return new ArrayList();
- }
-
- /**
- * get the modified variables.
- * @return the variables from we change value
- */
- public List getModifiedVariable() {
- final ArrayList list = new ArrayList();
- for (int i = 0; i < vars.length; i++) {
- list.addAll(vars[i].getModifiedVariable());
- }
- return list;
- }
-
- /**
- * Get the variables used.
- * @return the variables used
- */
- public List getUsedVariable() {
- final ArrayList list = new ArrayList();
- for (int i = 0; i < vars.length; i++) {
- list.addAll(vars[i].getUsedVariable());
- }
- return list;
- }
-}