public void AddLeafNode(Token token)
        {
            ASTNode newNode = new ASTNode(token);

            if (Root is null)
            {
                Root        = newNode;
                CurrentNode = Root;
            }
            else
            {
                CurrentNode.AddDescendant(newNode);
            }
            CurrentSession.Diagnostics.Semantic_ReportAddingASTNode(newNode);
        }
 public void AddBranchNode(ASTNode newNode)
 {
     if (newNode != null)
     {
         if (Root is null)
         {
             Root        = newNode;
             CurrentNode = Root;
         }
         else
         {
             CurrentNode.AddDescendant(newNode);
             CurrentNode = newNode;
         }
         CurrentSession.Diagnostics.Semantic_ReportAddingASTNode(newNode);
     }
 }