First try, not finished
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / AstNode.java
1 package net.sourceforge.phpdt.internal.compiler.ast;
2
3 /**
4  * It will be the mother of our own ast tree for php just like the ast tree of Eclipse.
5  * @author Matthieu Casanova
6  */
7 public abstract class AstNode {
8
9   public int sourceStart, sourceEnd;
10
11   /**
12    * Add some tabulations.
13    * @param tab the number of tabulations
14    * @return a String containing some spaces
15    */
16   public static String tabString(int tab) {
17     StringBuffer s = new StringBuffer();
18     for (int i = tab; i > 0; i--)
19       s.append("  "); //$NON-NLS-1$
20     return s.toString();
21   }
22
23   public String toString() {
24     return toString(0);
25   }
26
27   public String toString(int tab) {
28     return "****" + super.toString() + "****";  //$NON-NLS-2$ //$NON-NLS-1$
29   }
30 }