Improved aml scanner for this bug
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / internal / compiler / ast / Expression.java
index 6bc82a1..effc5d9 100644 (file)
@@ -214,8 +214,8 @@ public class Expression extends Statement {
         * Expression statements are plain expressions, however they generate like
         * normal expressions with no value required.
         *
-        * @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 
         */
 //     public void generateCode(BlockScope currentScope, CodeStream codeStream) {
 //
@@ -228,8 +228,8 @@ public class Expression extends Statement {
        /**
         * Every expression is responsible for generating its implicit conversion when necessary.
         *
-        * @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(
@@ -315,7 +315,7 @@ public class Expression extends Statement {
 //      */
 //     public void generateOptimizedStringBuffer(
 //             BlockScope blockScope,
-//             org.eclipse.jdt.internal.compiler.codegen.CodeStream codeStream,
+//             net.sourceforge.phpdt.internal.compiler.codegen.CodeStream codeStream,
 //             int typeID) {
 //
 //             generateCode(blockScope, codeStream, true);
@@ -426,7 +426,19 @@ public class Expression extends Statement {
        public boolean isTypeReference() {
                return false;
        }
+       public StringBuffer print(int indent, StringBuffer output) {
+               printIndent(indent, output);
+               return printExpression(indent, output);
+       }
 
+       public StringBuffer printExpression(int indent, StringBuffer output) {
+         output.append(super.toString(0));
+         return output;
+       }
+       
+       public StringBuffer printStatement(int indent, StringBuffer output) {
+               return print(indent, output).append(";"); //$NON-NLS-1$
+       }
        public void resolve(BlockScope scope) {
                // drops the returning expression's type whatever the type is.