@@ -86,11 +86,11 @@ def extract_result_types(comment):
86
86
parsed.
87
87
"""
88
88
result_types = []
89
- m = re .search (r "Usable as: Any Matcher[\s\n]*$" , comment , re .S )
89
+ m = re .search ("Usable as: Any Matcher[\ \ s\n ]*$" , comment , re .S )
90
90
if m :
91
91
return ["*" ]
92
92
while True :
93
- m = re .match (r "^(.*)Matcher<([^>]+)>\s*,?[\s\n]*$" , comment , re .S )
93
+ m = re .match ("^(.*)Matcher<([^>]+)>\\ s*,?[\ \ s\n ]*$" , comment , re .S )
94
94
if not m :
95
95
if re .search (r"Usable as:\s*$" , comment ):
96
96
return result_types
@@ -101,9 +101,9 @@ def extract_result_types(comment):
101
101
102
102
103
103
def strip_doxygen (comment ):
104
- """Returns the given comment without \-escaped words."""
104
+ r """Returns the given comment without \-escaped words."""
105
105
# If there is only a doxygen keyword in the line, delete the whole line.
106
- comment = re .sub (r "^\\[^ \s]+\n" , r"" , comment , flags = re .M )
106
+ comment = re .sub ("^\\ \\ [^ \ \ s]+\n " , r"" , comment , flags = re .M )
107
107
108
108
# If there is a doxygen \see command, change the \see prefix into "See also:".
109
109
# FIXME: it would be better to turn this into a link to the target instead.
@@ -236,7 +236,7 @@ def act_on_decl(declaration, comment, allowed_types):
236
236
237
237
# Parse the various matcher definition macros.
238
238
m = re .match (
239
- """.*AST_TYPE(LOC)?_TRAVERSE_MATCHER(?:_DECL)?\(
239
+ r """.*AST_TYPE(LOC)?_TRAVERSE_MATCHER(?:_DECL)?\(
240
240
\s*([^\s,]+\s*),
241
241
\s*(?:[^\s,]+\s*),
242
242
\s*AST_POLYMORPHIC_SUPPORTED_TYPES\(([^)]*)\)
0 commit comments