1 package net.sourceforge.phpdt.internal.compiler.ast;
7 * @author Matthieu Casanova
9 public final class FunctionCall extends AbstractSuffixExpression {
11 /** the function name. */
12 private final Expression functionName;
15 private final Expression[] args;
19 * it's <code>functionName(args ...)
20 * @param functionName the function name
21 * @param args the arguments
22 * @param sourceEnd the source end
24 public FunctionCall(final Expression functionName,
25 final Expression[] args,
26 final int sourceEnd) {
27 super(functionName.sourceStart, sourceEnd);
28 this.functionName = functionName;
33 * Return the expression as String.
34 * @return the expression
36 public String toStringExpression() {
37 final StringBuffer buff = new StringBuffer(functionName.toStringExpression());
40 for (int i = 0; i < args.length; i++) {
41 final Expression arg = args[i];
45 buff.append(arg.toStringExpression());
49 return buff.toString();
53 * Get the variables from outside (parameters, globals ...)
55 * @param list the list where we will put variables
57 public void getOutsideVariable(final List list) {}
60 * get the modified variables.
62 * @param list the list where we will put variables
64 public void getModifiedVariable(final List list) {
66 for (int i = 0; i < args.length; i++) {
67 args[i].getModifiedVariable(list);
73 * Get the variables used.
75 * @param list the list where we will put variables
77 public void getUsedVariable(final List list) {
78 functionName.getUsedVariable(list);
80 for (int i = 0; i < args.length; i++) {
81 args[i].getUsedVariable(list);