NArrange.VisualBasic.VBParser.ParseCommentLine C# (CSharp) Method

ParseCommentLine() private method

Parses a comment line.
private ParseCommentLine ( ) : CommentElement
return NArrange.Core.CodeElements.CommentElement
        private CommentElement ParseCommentLine()
        {
            CommentElement commentLine;

            StringBuilder commentTextBuilder = new StringBuilder(DefaultBlockLength);

            CommentType commentType = CommentType.Line;
            if (NextChar == VBSymbol.BeginComment)
            {
                TryReadChar();
                if (NextChar == VBSymbol.BeginComment)
                {
                    commentType = CommentType.XmlLine;
                    TryReadChar();
                }
                else
                {
                    commentTextBuilder.Append(VBSymbol.BeginComment);
                }
            }

            commentTextBuilder.Append(ReadLine());
            commentLine = new CommentElement(commentTextBuilder.ToString(), commentType);
            return commentLine;
        }