X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArgumentDeclaration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArgumentDeclaration.java index cffc971..e2fa5f4 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArgumentDeclaration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/ArgumentDeclaration.java @@ -7,34 +7,48 @@ package net.sourceforge.phpdt.internal.compiler.ast; */ public class ArgumentDeclaration extends VariableDeclaration { + /** The argument is a reference or not. */ public boolean reference; /** * Create an argument. - * @param initialization the initialization * @param name the name + * @param reference the variable is a reference ? + * @param initialization the initialization * @param sourceStart the start point */ - public ArgumentDeclaration(char[] name, - Expression initialization, - int sourceStart, - boolean reference) { - super(name, initialization, sourceStart); + public ArgumentDeclaration(final Variable name, + final boolean reference, + final Expression initialization, + final int sourceStart) { + super(name, initialization,VariableDeclaration.EQUAL, sourceStart); this.reference = reference; } /** + * Create an argument. + * @param name the name + * @param reference the variable is a reference ? + * @param sourceStart the start point + */ + public ArgumentDeclaration(final Variable name, + final boolean reference, + final int sourceStart) { + super(name, sourceStart); + this.reference = reference; + } + /** * Return the expression as String. * @return the expression */ public String toStringExpression() { final StringBuffer buff; if (reference) { - buff = new StringBuffer("&$"); + buff = new StringBuffer("&"); } else { - buff = new StringBuffer("$"); + buff = new StringBuffer(); } - buff.append(name); + buff.append(variable.toStringExpression()); if (initialization != null) { buff.append(" = "); buff.append(initialization.toStringExpression());