First try, not finished
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / Expression.java
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Expression.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Expression.java
new file mode 100644 (file)
index 0000000..76fc023
--- /dev/null
@@ -0,0 +1,26 @@
+package net.sourceforge.phpdt.internal.compiler.ast;
+
+/**
+ * An expression.
+ * @author Matthieu Casanova
+ */
+public class Expression extends AstNode {
+
+  public String toString(int tab) {
+    String s = tabString(tab);
+    return s + toStringExpression(tab);
+  }
+
+  //Subclass re-define toStringExpression
+//This method is abstract and should never be called
+//but we provide some code that is running.....just in case
+//of developpement time (while every  thing is not built)
+  public String toStringExpression() {
+    return super.toString(0);
+  }
+
+  public String toStringExpression(int tab) {
+    // default is regular toString expression (qualified allocation expressions redifine this method)
+    return this.toStringExpression();
+  }
+}