コード例 #1
0
 public ParseNodeDrawable(ParseNodeDrawable parent, ParseNodeDrawable child, string symbol)
 {
     this.children = new List <ParseNode>();
     this.depth    = child.depth;
     child.UpdateDepths(this.depth + 1);
     this.parent = parent;
     this.parent.SetChild(parent.GetChildIndex(child), this);
     this.children.Add(child);
     child.parent = this;
     this.data    = new Symbol(symbol);
 }
コード例 #2
0
 public void ReplaceChild(ParseNodeDrawable oldChild, ParseNodeDrawable newChild)
 {
     newChild.UpdateDepths(this.depth + 1);
     newChild.parent = this;
     children[children.IndexOf(oldChild)] = newChild;
 }