*******************************************************************************/
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.flow.FlowContext;
import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
/**
* Constructor call 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) {
//
public void setFieldIndex(int depth) {
// ignore for here
}
+ public StringBuffer printStatement(int indent, StringBuffer output) {
+ printIndent(indent, output);
+ if (qualification != null) qualification.printExpression(0, output).append('.');
+ if (accessMode == This) {
+ output.append("this("); //$NON-NLS-1$
+ } else {
+ output.append("super("); //$NON-NLS-1$
+ }
+ if (arguments != null) {
+ for (int i = 0; i < arguments.length; i++) {
+ if (i > 0) output.append(", "); //$NON-NLS-1$
+ arguments[i].printExpression(0, output);
+ }
+ }
+ return output.append(");"); //$NON-NLS-1$
+ }
public String toString(int tab) {
String s = tabString(tab);
return s;
}
- public void traverse(IAbstractSyntaxTreeVisitor visitor, BlockScope scope) {
+ public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (qualification != null) {