コード例 #1
0
        private static string GetAsText(CppComment comment, bool trimEnd = true)
        {
            if (comment == null)
            {
                return(null);
            }
            var text = comment.ToString();

            return(trimEnd ? text.TrimEnd() : text);
        }
コード例 #2
0
        static void PrintComment(CppComment comment)
        {
            if (!_printComments || comment == null)
            {
                return;
            }

            if (!string.IsNullOrEmpty(comment.ToString()))
            {
                Console.WriteLine($"// {comment}");
            }
        }