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