1 package net.sourceforge.phpdt.internal.compiler.ast;
4 import java.util.ArrayList;
8 * @author Matthieu Casanova
10 public class FunctionCall extends AbstractSuffixExpression {
12 /** the function name. */
13 public Expression functionName;
16 public Expression[] args;
18 public FunctionCall(final Expression prefix,
19 final Expression[] args,
20 final int sourceEnd) {
21 super(prefix.sourceStart, sourceEnd);
22 this.functionName = prefix;
27 * Return the expression as String.
28 * @return the expression
30 public String toStringExpression() {
31 final StringBuffer buff = new StringBuffer(functionName.toStringExpression());
34 for (int i = 0; i < args.length; i++) {
35 final Expression arg = args[i];
39 buff.append(arg.toStringExpression());
43 return buff.toString();
47 * Get the variables from outside (parameters, globals ...)
49 public void getOutsideVariable(final List list) {
53 * get the modified variables.
55 public void getModifiedVariable(final List list) {
57 for (int i = 0; i < args.length; i++) {
58 args[i].getModifiedVariable(list);
64 * Get the variables used.
66 public void getUsedVariable(final List list) {
67 functionName.getUsedVariable(list);
69 for (int i = 0; i < args.length; i++) {
70 args[i].getUsedVariable(list);