public MangoObject(string Name, string Body)
 {
     this.Name = Name;
     this.Body = Body;
     children  = new MangoObject[0];
     parent    = null;
 }
 public MangoObject(string Name, string Body, MangoSkeleton parent)
 {
     this.Name     = Name;
     this.Body     = Body;
     this.children = new MangoObject[0];
     SetParent(parent);
 }
 public void SetParent(MangoSkeleton parent)// stops AddChild() and ClearParent() from looping forever
 {
     ClearParent();
     this.parent = parent;
     if (!(parent.HasChild(this)))
     {
         parent.AddChild(this);
     }
 }
 public MangoObject(string Name, string Body, int Start, int End)
 {
     //ideal for making from parsed string;
     this.Name   = Name;
     this.Body   = Body;
     children    = new MangoObject[0];
     parent      = null;
     ObjectStart = Start;
     ObjectEnd   = End;
 }
 public void RemoveParent()//sets parent to null, while leaving object as child of prevoius parent
 {
     parent = null;
 }
 public void ClearParent()//disassociates object from parent entirely
 {
     parent.RemoveChild(this);
     parent = null;
 }
        }                                  //finds location in parsed string that object ends

        public MangoObject()
        {
            parent   = null;
            children = new MangoObject[0];
        }