improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / internal / compiler / ast / AssertStatement.java
index 1d42371..56889f7 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;
@@ -118,7 +117,17 @@ public class AssertStatement extends Statement {
 //             }       
 //             codeStream.recordPositionsFrom(pc, this.sourceStart);
 //     }
+       public StringBuffer printStatement(int tab, StringBuffer output) {
 
+               printIndent(tab, output);
+               output.append("assert "); //$NON-NLS-1$
+               this.assertExpression.printExpression(0, output);
+               if (this.exceptionArgument != null) {
+                       output.append(": "); //$NON-NLS-1$
+                       this.exceptionArgument.printExpression(0, output);
+               }
+               return output.append(';');
+       }
        public void resolve(BlockScope scope) {
 
                assertExpression.resolveTypeExpecting(scope, BooleanBinding);
@@ -133,7 +142,7 @@ public class AssertStatement extends Statement {
                }
        }
        
-       public void traverse(IAbstractSyntaxTreeVisitor visitor, BlockScope scope) {
+       public void traverse(ASTVisitor visitor, BlockScope scope) {
 
                if (visitor.visit(this, scope)) {
                        assertExpression.traverse(visitor, scope);