find_const_comment(type, const_name)
Finds a comment matching type and const_name either above the comment or in the matching Document- section.
# File lib/rdoc/parser/c.rb, line 393 def find_const_comment(type, const_name) if @content =~ %{((?>^\s*/\*.*?\*/\s+)) rb_define_#{type}\((?:\s*(\w+),)?\s*"#{const_name}"\s*,.*?\)\s*;}mi $1 elsif @content =~ %{Document-(?:const|global|variable):\s#{const_name}\s*?\n((?>.*?\*/))} $1 else '' end end