Exemplo n.º 1
0
 private Node(Node parent, TokenType tokenType, string text = "")
 {
     Parent = parent;
     TokenType = tokenType;
     Text = text ?? "";
     Children = new List<Node>();
 }
Exemplo n.º 2
0
 public Node AddChild(TokenType tokenType, string text = "")
 {
     Node child = new Node(this, tokenType, text);
     Children.Add(child);
     return child;
 }