Ejemplo n.º 1
0
        /*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;
            }
        }
Ejemplo n.º 2
0
 public virtual void  setFirstChild(AST c)
 {
     down = (BaseAST)c;
 }
Ejemplo n.º 3
0
 public virtual void  setNextSibling(AST n)
 {
     right = (BaseAST)n;
 }
Ejemplo n.º 4
0
 /*Remove all children */
 public virtual void  removeChildren()
 {
     down = null;
 }