RubyParser is a compound parser that first attempts to parse using the 1.9 syntax parser and falls back to the 1.8 syntax parser on a parse error.
# File lib/ruby_parser_extras.rb, line 1291 def process(s, f = "(string)") # parens for emacs *sigh* @p19.process s, f rescue Racc::ParseError @p18.process s, f end
# File lib/ruby_parser_extras.rb, line 1299 def reset @p18.reset @p19.reset end
# File lib/ruby_parser_extras.rb, line 1286 def initialize @p18 = Ruby18Parser.new @p19 = Ruby19Parser.new end