X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java index c91788d..721354a 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/FunctionCall.java @@ -1,18 +1,24 @@ package net.sourceforge.phpdt.internal.compiler.ast; +import java.util.List; + /** + * A Function call. * @author Matthieu Casanova */ public class FunctionCall extends AbstractSuffixExpression { - public Expression prefix; + /** the function name. */ + public Expression functionName; + + /** the arguments. */ public Expression[] args; - public FunctionCall(Expression prefix, - Expression[] args, - int sourceEnd) { + public FunctionCall(final Expression prefix, + final Expression[] args, + final int sourceEnd) { super(prefix.sourceStart, sourceEnd); - this.prefix = prefix; + this.functionName = prefix; this.args = args; } @@ -21,11 +27,11 @@ public class FunctionCall extends AbstractSuffixExpression { * @return the expression */ public String toStringExpression() { - final StringBuffer buff = new StringBuffer(prefix.toStringExpression()); + final StringBuffer buff = new StringBuffer(functionName.toStringExpression()); buff.append('('); if (args != null) { for (int i = 0; i < args.length; i++) { - Expression arg = args[i]; + final Expression arg = args[i]; if (i != 0) { buff.append(','); } @@ -35,4 +41,33 @@ public class FunctionCall extends AbstractSuffixExpression { buff.append(')'); return buff.toString(); } + + /** + * Get the variables from outside (parameters, globals ...) + */ + public void getOutsideVariable(final List list) { + } + + /** + * get the modified variables. + */ + public void getModifiedVariable(final List list) { + if (args != null) { + for (int i = 0; i < args.length; i++) { + args[i].getModifiedVariable(list); + } + } + } + + /** + * Get the variables used. + */ + public void getUsedVariable(final List list) { + functionName.getUsedVariable(list); + if (args != null) { + for (int i = 0; i < args.length; i++) { + args[i].getUsedVariable(list); + } + } + } }