11using System ;
2- using System . Collections . Generic ;
32using System . Linq ;
4- using System . Text ;
53using CppSharp . AST ;
6- using CppSharp . Generators . CSharp ;
7- using System . Text . RegularExpressions ;
84using CppSharp . Generators ;
95
106namespace CppSharp . Passes
117{
128 public class CleanCommentsPass : TranslationUnitPass , ICommentVisitor < bool >
139 {
14- public bool VisitBlockCommand ( BlockCommandComment comment )
10+ public CleanCommentsPass ( )
1511 {
16- return true ;
12+ VisitOptions . VisitClassBases = false ;
13+ VisitOptions . VisitFunctionReturnType = false ;
14+ VisitOptions . VisitTemplateArguments = false ;
1715 }
1816
17+ public bool VisitBlockCommand ( BlockCommandComment comment ) => true ;
18+
19+ public override bool VisitParameterDecl ( Parameter parameter ) =>
20+ base . VisitDeclaration ( parameter ) ;
21+
1922 public override bool VisitDeclaration ( Declaration decl )
2023 {
2124 if ( ! base . VisitDeclaration ( decl ) )
@@ -38,20 +41,11 @@ public bool VisitFull(FullComment comment)
3841 return true ;
3942 }
4043 #region Comments Visit
41- public bool VisitHTMLEndTag ( HTMLEndTagComment comment )
42- {
43- return true ;
44- }
44+ public bool VisitHTMLEndTag ( HTMLEndTagComment comment ) => true ;
4545
46- public bool VisitHTMLStartTag ( HTMLStartTagComment comment )
47- {
48- return true ;
49- }
46+ public bool VisitHTMLStartTag ( HTMLStartTagComment comment ) => true ;
5047
51- public bool VisitInlineCommand ( InlineCommandComment comment )
52- {
53- return true ;
54- }
48+ public bool VisitInlineCommand ( InlineCommandComment comment ) => true ;
5549
5650 public bool VisitParagraphCommand ( ParagraphComment comment )
5751 {
@@ -78,35 +72,17 @@ public bool VisitParagraphCommand(ParagraphComment comment)
7872 return true ;
7973 }
8074
81- public bool VisitParamCommand ( ParamCommandComment comment )
82- {
83- return true ;
84- }
75+ public bool VisitParamCommand ( ParamCommandComment comment ) => true ;
8576
86- public bool VisitText ( TextComment comment )
87- {
88- return true ;
89- }
77+ public bool VisitText ( TextComment comment ) => true ;
9078
91- public bool VisitTParamCommand ( TParamCommandComment comment )
92- {
93- return true ;
94- }
79+ public bool VisitTParamCommand ( TParamCommandComment comment ) => true ;
9580
96- public bool VisitVerbatimBlock ( VerbatimBlockComment comment )
97- {
98- return true ;
99- }
81+ public bool VisitVerbatimBlock ( VerbatimBlockComment comment ) => true ;
10082
101- public bool VisitVerbatimBlockLine ( VerbatimBlockLineComment comment )
102- {
103- return true ;
104- }
83+ public bool VisitVerbatimBlockLine ( VerbatimBlockLineComment comment ) => true ;
10584
106- public bool VisitVerbatimLine ( VerbatimLineComment comment )
107- {
108- return true ;
109- }
85+ public bool VisitVerbatimLine ( VerbatimLineComment comment ) => true ;
11086 #endregion
11187 }
11288}
0 commit comments