mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Change :enddoc: to terminate processing of current file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
03f06115a6
commit
902c0e2c57
2 changed files with 27 additions and 18 deletions
|
@ -51,6 +51,12 @@ Wed Apr 14 11:29:56 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
|||
* numeric.c (flo_eq): workaround for bcc32's bug.
|
||||
(ruby-bugs-ja:PR#594)
|
||||
|
||||
Wed Apr 14 11:06:38 2004 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::scan): Changed
|
||||
behavior of :enddoc: -- it now unconditionally terminates
|
||||
processing of the current file.
|
||||
|
||||
Wed Apr 14 10:57:40 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* defines.h: include <net/socket.h> to get fd_set definition in BeOS.
|
||||
|
|
|
@ -1400,22 +1400,24 @@ module RDoc
|
|||
@unget_read = []
|
||||
@read = []
|
||||
catch(:eof) do
|
||||
begin
|
||||
parse_toplevel_statements(@top_level)
|
||||
rescue Exception => e
|
||||
$stderr.puts "\n\n"
|
||||
$stderr.puts "RDoc failure in #@input_file_name at or around " +
|
||||
"line #{@scanner.line_no} column #{@scanner.char_no}"
|
||||
$stderr.puts
|
||||
$stderr.puts "Before reporting this, could you check that the file"
|
||||
$stderr.puts "you're documenting compiles cleanly--RDoc is not a"
|
||||
$stderr.puts "full Ruby parser, and gets confused easily if fed"
|
||||
$stderr.puts "invalid programs."
|
||||
$stderr.puts
|
||||
$stderr.puts "The internal error was:\n\n"
|
||||
|
||||
e.set_backtrace(e.backtrace[0,4])
|
||||
raise
|
||||
catch(:enddoc) do
|
||||
begin
|
||||
parse_toplevel_statements(@top_level)
|
||||
rescue Exception => e
|
||||
$stderr.puts "\n\n"
|
||||
$stderr.puts "RDoc failure in #@input_file_name at or around " +
|
||||
"line #{@scanner.line_no} column #{@scanner.char_no}"
|
||||
$stderr.puts
|
||||
$stderr.puts "Before reporting this, could you check that the file"
|
||||
$stderr.puts "you're documenting compiles cleanly--RDoc is not a"
|
||||
$stderr.puts "full Ruby parser, and gets confused easily if fed"
|
||||
$stderr.puts "invalid programs."
|
||||
$stderr.puts
|
||||
$stderr.puts "The internal error was:\n\n"
|
||||
|
||||
e.set_backtrace(e.backtrace[0,4])
|
||||
raise
|
||||
end
|
||||
end
|
||||
end
|
||||
@top_level
|
||||
|
@ -2278,8 +2280,9 @@ module RDoc
|
|||
""
|
||||
|
||||
when "enddoc"
|
||||
context.done_documenting = true
|
||||
""
|
||||
#context.done_documenting = true
|
||||
#""
|
||||
throw :enddoc
|
||||
|
||||
when "main"
|
||||
options = Options.instance
|
||||
|
|
Loading…
Reference in a new issue