コード例 #1
0
 public void VisitLineComment(AbsynLineComment comment)
 {
     foreach (var line in Lines(comment.Comment))
     {
         writer.Indent();
         writer.WriteComment($"// {line}");
         writer.Terminate();
     }
 }
コード例 #2
0
ファイル: CodeFormatterTests.cs プロジェクト: JieNou/reko
        public void CfAbsynComment_Multiline()
        {
            formatter.Indentation = 1;
            var cmt = new AbsynLineComment(
                @"First abstract syntax comment line
Second abstract syntax comment line");

            cmt.Accept(cf);
            var expected =
                @" // First abstract syntax comment line
 // Second abstract syntax comment line
";

            Assert.AreEqual(expected, sw.ToString());
        }
コード例 #3
0
 public AbsynStatement VisitLineComment(AbsynLineComment comment)
 {
     return(comment);
 }
コード例 #4
0
 public void VisitLineComment(AbsynLineComment comment)
 {
     stms.Add(comment);
 }
コード例 #5
0
 public bool VisitLineComment(AbsynLineComment comment)
 {
     return(false);
 }
コード例 #6
0
ファイル: CodeFormatter.cs プロジェクト: mmyydd/reko
 public void VisitLineComment(AbsynLineComment comment)
 {
     writer.WriteComment("// " + comment.Comment);
     writer.Terminate();
 }