Rakefile in ruby_parser-3.0.1 vs Rakefile in ruby_parser-3.0.2
- old
+ new
@@ -142,28 +142,31 @@
ENV["V"] ||= "19"
Rake.application[:parser].invoke # this way we can have DEBUG set
$: << "lib"
require 'ruby_parser'
+ require 'pp'
parser = if ENV["V"] == "18" then
Ruby18Parser.new
else
Ruby19Parser.new
end
+ time = (ENV["RP_TIMEOUT"] || 10).to_i
+
file = ENV["F"] || ENV["FILE"]
ruby = if file then
File.read(file)
else
file = "env"
ENV["R"] || ENV["RUBY"]
end
begin
- p parser.process(ruby, file)
+ pp parser.process(ruby, file, time)
rescue Racc::ParseError => e
p e
ss = parser.lexer.src
src = ss.string
lines = src[0..ss.pos].split(/\n/)
@@ -181,8 +184,12 @@
Rake.application[:parser].invoke # this way we can have DEBUG set
file = ENV["F"] || ENV["FILE"]
ruby "-Ilib", "bin/ruby_parse_extract_error", file
+end
+
+task :bugs do
+ sh "for f in bug*.rb ; do rake debug F=$f && rm $f ; done"
end
# vim: syntax=Ruby