*/
public abstract class AstNode {
+ /** Starting and ending position of the node in the sources. */
public int sourceStart, sourceEnd;
/**
+ * Create a node giving starting and ending offset
+ * @param sourceStart starting offset
+ * @param sourceEnd ending offset
+ */
+ public AstNode(int sourceStart, int sourceEnd) {
+ this.sourceStart = sourceStart;
+ this.sourceEnd = sourceEnd;
+ }
+
+ /**
* Add some tabulations.
* @param tab the number of tabulations
* @return a String containing some spaces
return s.toString();
}
+ /**
+ * Return the object into String.
+ * It should be overriden
+ * @return a String
+ */
public String toString() {
- return toString(0);
- }
-
- public String toString(int tab) {
return "****" + super.toString() + "****"; //$NON-NLS-2$ //$NON-NLS-1$
}
+
+ /**
+ * Return the object into String.
+ * @param tab how many tabs (not used here
+ * @return a String
+ */
+ public abstract String toString(int tab);
}