1 package polyglot.ast; 2 3 import polyglot.util.CodeWriter; 4 import polyglot.util.Copy; 5 6 /** 7 * <code>Ext</code> is the super type of all node extension objects. 8 * It contains a pointer back to the node it is extending and a possibly-null 9 * pointer to another extension node. 10 */ 11 public interface Ext extends Copy 12 { 13 /** The node that we are extending. */ 14 Node node(); 15 16 /** 17 * Initialize the extension object's pointer back to the node. 18 * This also initializes the back pointers for all extensions of 19 * the extension. 20 */ 21 void init(Node node); 22 23 /** An extension of this extension, or null. */ 24 Ext ext(); 25 26 /** Set the extension of this extension. */ 27 Ext ext(Ext ext); 28 29 /** 30 * Dump the AST node for debugging purposes. 31 */ 32 void dump(CodeWriter w); 33 } 34