mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Handle aliases in C files
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dc03b05a7e
commit
a928cfed87
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Feb 24 06:32:27 2004 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_aliases): Handle
|
||||
aliases in C files.
|
||||
|
||||
Tue Feb 24 06:16:22 2004 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* lib/rdoc/rdoc.rb (RDoc::RDoc::document): Now create op dir _before_
|
||||
|
|
|
@ -165,6 +165,7 @@ module RDoc
|
|||
do_classes
|
||||
do_methods
|
||||
do_includes
|
||||
do_aliases
|
||||
@top_level
|
||||
end
|
||||
|
||||
|
@ -321,6 +322,19 @@ module RDoc
|
|||
end
|
||||
|
||||
############################################################
|
||||
|
||||
def do_aliases
|
||||
@body.scan(%r{rb_define_alias\(\s*(\w+),\s*"([^"]+)",\s*"([^"]+)"\s*\)}m) do
|
||||
|var_name, new_name, old_name|
|
||||
@stats.num_methods += 1
|
||||
class_name = @known_classes[var_name] || var_name
|
||||
class_obj = find_class(var_name, class_name)
|
||||
|
||||
class_obj.add_alias(Alias.new("", old_name, new_name, ""))
|
||||
end
|
||||
end
|
||||
|
||||
############################################################
|
||||
|
||||
def handle_method(type, var_name, meth_name,
|
||||
meth_body, param_count, source_file = nil)
|
||||
|
|
Loading…
Reference in a new issue