зеркало из https://github.com/github/ruby.git
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:
Родитель
dc03b05a7e
Коммит
a928cfed87
|
@ -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
|
||||
|
||||
|
@ -322,6 +323,19 @@ module RDoc
|
|||
|
||||
############################################################
|
||||
|
||||
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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче