示例#1
0
 public Tree(Pile pile, Tree parent, Kind kind)
 {
     Parent   = parent;
     Kind     = kind;
     Children = new List <Tree>(0);
     Pile     = pile;
 }
示例#2
0
 public Tree(string content, Kind kind, Tree parent = null)
 {
     Pile     = new Pile(content);
     End      = content.Length - 1;
     Kind     = kind;
     Children = new List <Tree>(0);
     Parent   = parent;
 }
示例#3
0
 public bool Set(bool save = true, bool Mark = true)
 {
     if (save)
     {
         Start = Pile.PilePos[Pile.PilePos.Count - 1];
         End   = Pile.CurrentPos - 1;
         Parent.Children.Add(this);
     }
     return(Pile.Leave(save, Mark));
 }