+++ /dev/null
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-import java.util.List;
-
-/**
- * A Function call.
- * @author Matthieu Casanova
- */
-public class FunctionCall extends AbstractSuffixExpression {
-
- /** the function name. */
- public Expression functionName;
-
- /** the arguments. */
- public Expression[] args;
-
- public FunctionCall(final Expression prefix,
- final Expression[] args,
- final int sourceEnd) {
- super(prefix.sourceStart, sourceEnd);
- this.functionName = prefix;
- this.args = args;
- }
-
- /**
- * Return the expression as String.
- * @return the expression
- */
- public String toStringExpression() {
- final StringBuffer buff = new StringBuffer(functionName.toStringExpression());
- buff.append('(');
- if (args != null) {
- for (int i = 0; i < args.length; i++) {
- final Expression arg = args[i];
- if (i != 0) {
- buff.append(',');
- }
- buff.append(arg.toStringExpression());
- }
- }
- 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);
- }
- }
- }
-}