improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / internal / compiler / ast / UnaryExpression.java
index ac2a75d..c46764e 100644 (file)
@@ -10,8 +10,7 @@
  *******************************************************************************/
 package net.sourceforge.phpeclipse.internal.compiler.ast;
 
-import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor;
-import net.sourceforge.phpdt.internal.compiler.codegen.Label;
+import net.sourceforge.phpdt.internal.compiler.ASTVisitor;
 import net.sourceforge.phpdt.internal.compiler.flow.FlowContext;
 import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
 import net.sourceforge.phpdt.internal.compiler.impl.Constant;
@@ -53,8 +52,8 @@ public class UnaryExpression extends OperatorExpression {
        /**
         * Code generation for an unary operation
         *
-        * @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
-        * @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
+        * @param currentScope net.sourceforge.phpdt.internal.compiler.lookup.BlockScope
+        * @param codeStream net.sourceforge.phpdt.internal.compiler.codegen.CodeStream
         * @param valueRequired boolean
         */
 //     public void generateCode(
@@ -279,14 +278,18 @@ public class UnaryExpression extends OperatorExpression {
                }
                return this.resolvedType;
        }
-
+       public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
+               
+               output.append(operatorToString()).append(' ');
+               return this.expression.printExpression(0, output);
+       } 
        public String toStringExpressionNoParenthesis() {
                
                return operatorToString() + " " + this.expression.toStringExpression(); //$NON-NLS-1$
        } 
        
        public void traverse(
-               IAbstractSyntaxTreeVisitor visitor,
+           ASTVisitor visitor,
                BlockScope blockScope) {
                        
                if (visitor.visit(this, blockScope)) {