Rubberduck.Parsing.VBA.ComponentParseTask.QualifyAndUnionComments C# (CSharp) Method

QualifyAndUnionComments() private method

private QualifyAndUnionComments ( QualifiedModuleName qualifiedName, IEnumerable comments, IEnumerable remComments ) : IEnumerable
qualifiedName Rubberduck.VBEditor.QualifiedModuleName
comments IEnumerable
remComments IEnumerable
return IEnumerable
        private IEnumerable<CommentNode> QualifyAndUnionComments(QualifiedModuleName qualifiedName, IEnumerable<VBAParser.CommentContext> comments, IEnumerable<VBAParser.RemCommentContext> remComments)
        {
            var commentNodes = comments.Select(comment => new CommentNode(comment.GetComment(), Tokens.CommentMarker, new QualifiedSelection(qualifiedName, comment.GetSelection())));
            var remCommentNodes = remComments.Select(comment => new CommentNode(comment.GetComment(), Tokens.Rem, new QualifiedSelection(qualifiedName, comment.GetSelection())));
            var allCommentNodes = commentNodes.Union(remCommentNodes);
            return allCommentNodes;
        }