*******************************************************************************/
package net.sourceforge.phpeclipse.internal.compiler.ast;
-import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor;
+import net.sourceforge.phpdt.internal.compiler.ASTVisitor;
import net.sourceforge.phpdt.internal.compiler.codegen.Label;
import net.sourceforge.phpdt.internal.compiler.flow.FlowContext;
import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
/**
* While code generation
*
- * @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) {
//
this.continueLabel.resetStateForCodeGeneration();
}
}
+ public StringBuffer printStatement(int tab, StringBuffer output) {
+ printIndent(tab, output).append("while ("); //$NON-NLS-1$
+ condition.printExpression(0, output).append(')');
+ if (action == null)
+ output.append(';');
+ else
+ action.printStatement(tab + 1, output);
+ return output;
+ }
public void resolve(BlockScope scope) {
TypeBinding type = condition.resolveTypeExpecting(scope, BooleanBinding);
}
public void traverse(
- IAbstractSyntaxTreeVisitor visitor,
+ ASTVisitor visitor,
BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {