private static string GetAsText(CppComment comment, bool trimEnd = true) { if (comment == null) { return(null); } var text = comment.ToString(); return(trimEnd ? text.TrimEnd() : text); }
static void PrintComment(CppComment comment) { if (!_printComments || comment == null) { return; } if (!string.IsNullOrEmpty(comment.ToString())) { Console.WriteLine($"// {comment}"); } }