From: kpouer Date: Thu, 3 Jul 2003 22:09:22 +0000 (+0000) Subject: The variable name is now an expression ... I know it's strange but in php you can... X-Git-Url: http://secure.phpeclipse.com?hp=60159d6dad1c292af1f061a3fb8dc5d0707d4ce0 The variable name is now an expression ... I know it's strange but in php you can do that : $a + $b = $c ... --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java index e54de47..6fff25b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/VarAssignation.java @@ -21,7 +21,7 @@ public class VarAssignation extends Expression { public static final int LSHIFT_EQUAL = 11; public static final int RSIGNEDSHIFT_EQUAL = 12; - public char[] variableName; + public Expression variableName; public Expression initializer; public int operator; @@ -33,7 +33,7 @@ public class VarAssignation extends Expression { * @param sourceStart the sourceStart * @param sourceEnd the sourceEnd */ - public VarAssignation(final char[] variableName, + public VarAssignation(final Expression variableName, final Expression initializer, final int operator, final int sourceStart, @@ -85,8 +85,7 @@ public class VarAssignation extends Expression { * @return the expression */ public String toStringExpression() { - final StringBuffer buff = new StringBuffer("$"); - buff.append(variableName); + final StringBuffer buff = new StringBuffer(variableName.toStringExpression()); buff.append(" ");//$NON-NLS-1$ buff.append(operatorToString()); buff.append(" ");//$NON-NLS-1$