Пример #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;
            }
        }
Пример #2
0
 public virtual void  setFirstChild(AST c)
 {
     down = (BaseAST)c;
 }
Пример #3
0
 public virtual void  setNextSibling(AST n)
 {
     right = (BaseAST)n;
 }
Пример #4
0
 /*Remove all children */
 public virtual void  removeChildren()
 {
     down = null;
 }