summaryrefslogtreecommitdiffstats
path: root/lib/rdoc/parsers
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-17 03:23:10 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-17 03:23:10 +0000
commitd2e7bd3754fa31e99a98f0a11adcfcbd4df463fe (patch)
tree46b0b307c959338b47a28a5e3ce7288529208663 /lib/rdoc/parsers
parente5aa67caf5ccee2e609de308fa6455d022a1691d (diff)
downloadruby-d2e7bd3754fa31e99a98f0a11adcfcbd4df463fe.tar.gz
ruby-d2e7bd3754fa31e99a98f0a11adcfcbd4df463fe.tar.xz
ruby-d2e7bd3754fa31e99a98f0a11adcfcbd4df463fe.zip
Change :enddoc: to terminate processing of current file
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/parsers')
-rw-r--r--lib/rdoc/parsers/parse_rb.rb39
1 files changed, 21 insertions, 18 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 1a660c1f3..42e942ca3 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -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