diff --git a/src/AST/Comment.cs b/src/AST/Comment.cs index 933052b6..a39246b6 100644 --- a/src/AST/Comment.cs +++ b/src/AST/Comment.cs @@ -26,7 +26,7 @@ namespace CppSharp.AST Merged } - public enum CommentKind + public enum DocumentationCommentKind { FullComment, BlockContentComment, @@ -123,7 +123,7 @@ namespace CppSharp.AST /// public abstract class Comment { - public CommentKind Kind { get; set; } + public DocumentationCommentKind Kind { get; set; } public abstract void Visit(ICommentVisitor visitor); @@ -236,7 +236,7 @@ namespace CppSharp.AST public BlockCommandComment() { - Kind = CommentKind.BlockCommandComment; + Kind = DocumentationCommentKind.BlockCommandComment; Arguments = new List(); } @@ -256,7 +256,7 @@ namespace CppSharp.AST public ParamCommandComment() { - Kind = CommentKind.ParamCommandComment; + Kind = DocumentationCommentKind.ParamCommandComment; } public enum PassDirection @@ -307,7 +307,7 @@ namespace CppSharp.AST public TParamCommandComment() { - Kind = CommentKind.TParamCommandComment; + Kind = DocumentationCommentKind.TParamCommandComment; Position = new List(); } @@ -328,7 +328,7 @@ namespace CppSharp.AST public VerbatimBlockComment() { - Kind = CommentKind.VerbatimBlockComment; + Kind = DocumentationCommentKind.VerbatimBlockComment; Lines = new List(); } @@ -349,7 +349,7 @@ namespace CppSharp.AST public VerbatimLineComment() { - Kind = CommentKind.VerbatimLineComment; + Kind = DocumentationCommentKind.VerbatimLineComment; } public override void Visit(ICommentVisitor visitor) @@ -369,7 +369,7 @@ namespace CppSharp.AST public ParagraphComment() { - Kind = CommentKind.ParagraphComment; + Kind = DocumentationCommentKind.ParagraphComment; Content = new List(); } @@ -386,7 +386,7 @@ namespace CppSharp.AST { protected InlineContentComment() { - Kind = CommentKind.InlineContentComment; + Kind = DocumentationCommentKind.InlineContentComment; } public bool HasTrailingNewline { get; set; } @@ -403,7 +403,7 @@ namespace CppSharp.AST protected HTMLTagComment() { - Kind = CommentKind.HTMLTagComment; + Kind = DocumentationCommentKind.HTMLTagComment; } } @@ -422,7 +422,7 @@ namespace CppSharp.AST public HTMLStartTagComment() { - Kind = CommentKind.HTMLStartTagComment; + Kind = DocumentationCommentKind.HTMLStartTagComment; Attributes = new List(); } @@ -439,7 +439,7 @@ namespace CppSharp.AST { public HTMLEndTagComment() { - Kind = CommentKind.HTMLEndTagComment; + Kind = DocumentationCommentKind.HTMLEndTagComment; } public override void Visit(ICommentVisitor visitor) @@ -457,7 +457,7 @@ namespace CppSharp.AST public TextComment() { - Kind = CommentKind.TextComment; + Kind = DocumentationCommentKind.TextComment; } public override void Visit(ICommentVisitor visitor) @@ -497,7 +497,7 @@ namespace CppSharp.AST public InlineCommandComment() { - Kind = CommentKind.InlineCommandComment; + Kind = DocumentationCommentKind.InlineCommandComment; Arguments = new List(); } @@ -516,7 +516,7 @@ namespace CppSharp.AST public VerbatimBlockLineComment() { - Kind = CommentKind.VerbatimBlockLineComment; + Kind = DocumentationCommentKind.VerbatimBlockLineComment; } public override void Visit(ICommentVisitor visitor) diff --git a/src/Generator/Generators/CSharp/CSharpCommentPrinter.cs b/src/Generator/Generators/CSharp/CSharpCommentPrinter.cs index 7c0eaef7..2308f9ff 100644 --- a/src/Generator/Generators/CSharp/CSharpCommentPrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpCommentPrinter.cs @@ -22,12 +22,12 @@ namespace CppSharp.Generators.CSharp { switch (comment.Kind) { - case CommentKind.FullComment: + case DocumentationCommentKind.FullComment: var fullComment = (FullComment) comment; foreach (var block in fullComment.Blocks) block.GetCommentSections(sections); break; - case CommentKind.BlockCommandComment: + case DocumentationCommentKind.BlockCommandComment: var blockCommandComment = (BlockCommandComment) comment; if (blockCommandComment.CommandKind == CommentCommandKind.Return && blockCommandComment.ParagraphComment != null) @@ -36,7 +36,7 @@ namespace CppSharp.Generators.CSharp blockCommandComment.ParagraphComment.GetCommentSections(sections); } break; - case CommentKind.ParamCommandComment: + case DocumentationCommentKind.ParamCommandComment: var paramCommandComment = (ParamCommandComment) comment; var param = new Section(CommentElement.Param); sections.Add(param); @@ -47,13 +47,13 @@ namespace CppSharp.Generators.CSharp foreach (var inlineContentComment in paramCommandComment.ParagraphComment.Content) inlineContentComment.GetCommentSections(sections); break; - case CommentKind.TParamCommandComment: + case DocumentationCommentKind.TParamCommandComment: break; - case CommentKind.VerbatimBlockComment: + case DocumentationCommentKind.VerbatimBlockComment: break; - case CommentKind.VerbatimLineComment: + case DocumentationCommentKind.VerbatimLineComment: break; - case CommentKind.ParagraphComment: + case DocumentationCommentKind.ParagraphComment: var summaryParagraph = sections.Count == 1; var paragraphComment = (ParagraphComment) comment; foreach (var inlineContentComment in paragraphComment.Content) @@ -65,24 +65,24 @@ namespace CppSharp.Generators.CSharp sections.Add(new Section(CommentElement.Remarks)); } break; - case CommentKind.HTMLTagComment: + case DocumentationCommentKind.HTMLTagComment: break; - case CommentKind.HTMLStartTagComment: + case DocumentationCommentKind.HTMLStartTagComment: break; - case CommentKind.HTMLEndTagComment: + case DocumentationCommentKind.HTMLEndTagComment: break; - case CommentKind.TextComment: + case DocumentationCommentKind.TextComment: var section = sections.Last(); section.Lines.Add(GetText(comment, section.Type == CommentElement.Returns || section.Type == CommentElement.Param)); if (sections.Count == 1) sections.Add(new Section(CommentElement.Remarks)); break; - case CommentKind.InlineContentComment: + case DocumentationCommentKind.InlineContentComment: break; - case CommentKind.InlineCommandComment: + case DocumentationCommentKind.InlineCommandComment: break; - case CommentKind.VerbatimBlockLineComment: + case DocumentationCommentKind.VerbatimBlockLineComment: break; } }