+++ /dev/null
-package net.sourceforge.phpdt.internal.compiler.ast;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.resource.ImageDescriptor;
-import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
-import net.sourceforge.phpdt.internal.ui.PHPUiImages;
-
-/**
- * a Define.
- * define(expression,expression)
- * @author Matthieu Casanova
- */
-public class Define extends Statement implements Outlineable {
-
- public Expression defineName,defineValue;
-
- private Object parent;
- private Position position;
-
- public Define(final Object parent,
- final Expression defineName,
- final Expression defineValue,
- final int sourceStart,
- final int sourceEnd) {
- super(sourceStart, sourceEnd);
- this.parent = parent;
- this.defineName = defineName;
- this.defineValue = defineValue;
- position = new Position(sourceStart, sourceEnd);
- }
-
- public String toString(final int tab) {
- final StringBuffer buff = new StringBuffer(tabString(tab));
- buff.append("define(");
- buff.append(defineName.toStringExpression());
- buff.append(", ");
- buff.append(defineValue.toStringExpression());
- buff.append(")");
- return buff.toString();
- }
-
- public String toString() {
- final StringBuffer buff = new StringBuffer(defineName.toStringExpression());
- buff.append(" = ");
- buff.append(defineValue.toStringExpression());
- return buff.toString();
- }
-
- public ImageDescriptor getImage() {
- return PHPUiImages.DESC_VAR;
- }
-
- public Object getParent() {
- return parent;
- }
-
- public Position getPosition() {
- return position;
- }
-}