1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc/parsers/parse_c.rb: more readability for mixing

progress "c..." and warning message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-05-12 07:53:39 +00:00
parent bf4eb61819
commit d806a4daa7
2 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Thu May 12 16:50:40 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* lib/rdoc/parsers/parse_c.rb: more readability for mixing
progress "c..." and warning message.
Thu May 12 15:50:56 2005 Tilman Sauerbeck <tilman@code-monkey.de> Thu May 12 15:50:56 2005 Tilman Sauerbeck <tilman@code-monkey.de>
* lib/rdoc/parsers/parse_c.rb: show parsing progress for C files. * lib/rdoc/parsers/parse_c.rb: show parsing progress for C files.

View file

@ -205,6 +205,12 @@ module RDoc
end end
end end
def warn(msg)
$stderr.puts
$stderr.puts msg
$stderr.flush
end
# remove lines that are commented out that might otherwise get # remove lines that are commented out that might otherwise get
# picked up when scanning for classes and methods # picked up when scanning for classes and methods
@ -220,8 +226,8 @@ module RDoc
if in_module if in_module
enclosure = @classes[in_module] enclosure = @classes[in_module]
unless enclosure unless enclosure
$stderr.puts("Enclosing class/module '#{in_module}' for " + warn("Enclosing class/module '#{in_module}' for " +
"#{class_mod} #{class_name} not known") "#{class_mod} #{class_name} not known")
return return
end end
else else
@ -417,7 +423,7 @@ module RDoc
class_obj = find_class(var_name, class_name) class_obj = find_class(var_name, class_name)
unless class_obj unless class_obj
$stderr.puts("Enclosing class/module '#{const_name}' for not known") warn("Enclosing class/module '#{const_name}' for not known")
return return
end end
@ -570,7 +576,7 @@ module RDoc
find_call_seq(comment, meth_obj) find_call_seq(comment, meth_obj)
meth_obj.comment = mangle_comment(comment) meth_obj.comment = mangle_comment(comment)
else else
$stderr.puts "No definition for #{meth_name}" warn "No definition for #{meth_name}"
end end
end end
end end