示例#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;
            }
            var 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;
 }
示例#5
0
 public virtual void setNextSibling(AST n)
 {
     right = (BaseAST) n;
 }
示例#6
0
 public virtual void setFirstChild(AST c)
 {
     down = (BaseAST) c;
 }
示例#7
0
 /*Remove all children */
 public virtual void removeChildren()
 {
     down = null;
 }
示例#8
0
 /*Add a node to the end of the child list for this node */
 public virtual void addChild(AST node)
 {
     if (node == null)
         return ;
     var t = this.down;
     if (t != null)
     {
         while (t.right != null)
         {
             t = t.right;
         }
         t.right = (BaseAST) node;
     }
     else
     {
         this.down = (BaseAST) node;
     }
 }