/*Add a node to the end of the child list for this node */ public virtual void addChild(AST node) { if (node == null) return; BaseAST t = this.down; if (t != null) { while (t.right != null) { t = t.right; } t.right = (BaseAST)node; } else { this.down = (BaseAST)node; } }
public virtual void setFirstChild(AST c) { down = (BaseAST)c; }
public virtual void setNextSibling(AST n) { right = (BaseAST)n; }
/*Remove all children */ public virtual void removeChildren() { down = null; }