Lines Matching defs:comment

18 <tr><td colspan="4" class="doc" id="%(id)s"><pre>%(comment)s</pre></td></tr>
57 def extract_result_types(comment):
58 """Extracts a list of result types from the given comment.
60 We allow annotations in the comment of the matcher to specify what
69 m = re.search(r'Usable as: Any Matcher[\s\n]*$', comment, re.S)
73 m = re.match(r'^(.*)Matcher<([^>]+)>\s*,?[\s\n]*$', comment, re.S)
75 if re.search(r'Usable as:\s*$', comment):
80 comment = m.group(1)
82 def strip_doxygen(comment):
83 """Returns the given comment without \-escaped words."""
85 comment = re.sub(r'^\\[^\s]+\n', r'', comment, flags=re.M)
87 comment = re.sub(r'\\[^\s]+\s+', r'', comment)
88 return comment
98 def add_matcher(result_type, name, args, comment, is_dyncast=False):
110 'comment': esc(strip_doxygen(comment)),
126 def act_on_decl(declaration, comment, allowed_types):
127 """Parse the matcher out of the given declaration and comment.
145 comment, is_dyncast=True)
156 comment, is_dyncast=True)
160 # comment, is_dyncast=True)
172 comment_result_types = extract_result_types(comment)
177 add_matcher(result_type, name, 'Matcher<Type>', comment)
180 comment)
204 add_matcher(result_type, name, args, comment)
223 add_matcher(result, name, args, comment)
249 add_matcher(result_type, name, args, comment)
259 add_matcher('*', name, 'Matcher<*>', comment)
270 add_matcher('*', name, 'Matcher<*>', comment)
273 add_matcher('*', name, 'Matcher<*>, ..., Matcher<*>', comment)
290 result_types = extract_result_types(comment)
292 if not comment:
299 add_matcher(result_type, name, args, comment)
322 comment = ''
330 act_on_decl(declaration, comment, allowed_types)
331 comment = ''
341 comment += re.sub(r'/+\s?', '', line) + '\n'
350 act_on_decl(declaration, comment, allowed_types)
351 comment = ''