public Token(Tk tk, params INode[] tokens)
        {
            Tk = tk;
            Id = Guid.NewGuid();
            var parentedChildren = tokens?.Select(c => c.WithParent(this, c.Id)) ?? Array.Empty <INode>();

            Children = parentedChildren;
        }
 public Atom(Tk tk, /*char? @char*/ string name, string regex) : base(tk)
 {
     //Char = @char;
     Name   = name;
     Regexp = regex;
 }
 //public IEnumerable<Token> TypeParameters { get; }
 public Element(Tk tk, ElemType type, params INode[] tokens) : base(tk, tokens)
 {
     Type = type;
 }
 public TokenElement(Tk tk, ElemType type, Atom atom) : base(tk, type)
 {
     Atom = atom;
 }
 public Operator(Tk tk, string name, OperatorType operatorType) : base(tk)
 {
     Name         = name;
     OperatorType = operatorType;
 }