1 package net.sourceforge.phpdt.internal.compiler.ast;
7 * @author Matthieu Casanova
9 public class FunctionCall extends AbstractSuffixExpression {
11 /** the function name. */
12 public Expression functionName;
15 public Expression[] args;
17 public FunctionCall(final Expression prefix,
18 final Expression[] args,
19 final int sourceEnd) {
20 super(prefix.sourceStart, sourceEnd);
21 this.functionName = prefix;
26 * Return the expression as String.
27 * @return the expression
29 public String toStringExpression() {
30 final StringBuffer buff = new StringBuffer(functionName.toStringExpression());
33 for (int i = 0; i < args.length; i++) {
34 final Expression arg = args[i];
38 buff.append(arg.toStringExpression());
42 return buff.toString();
46 * Get the variables from outside (parameters, globals ...)
48 public void getOutsideVariable(final List list) {
52 * get the modified variables.
54 public void getModifiedVariable(final List list) {
56 for (int i = 0; i < args.length; i++) {
57 args[i].getModifiedVariable(list);
63 * Get the variables used.
65 public void getUsedVariable(final List list) {
66 functionName.getUsedVariable(list);
68 for (int i = 0; i < args.length; i++) {
69 args[i].getUsedVariable(list);