Sha256: 501ab987bb36fa60b74d2227183fae50aa69c5f2124de146331660f9cc1eff56
Contents?: true
Size: 562 Bytes
Versions: 45
Compression:
Stored size: 562 Bytes
Contents
#!/usr/bin/ruby -ws require 'rubygems' require 'ruby2ruby' require 'ruby_parser' $h ||= false $s ||= false if $h then puts "usage: #{File.basename $0} [options] [file...]" puts "options:" puts "-h : display usage" puts "-s : print the sexp before displaying the translated ruby" exit 1 end ARGV.push "-" if ARGV.empty? parser = Ruby18Parser.new ruby2ruby = Ruby2Ruby.new ARGV.each do |file| ruby = file == "-" ? $stdin.read : File.read(file) sexp = parser.process(ruby, file) p sexp if $s puts ruby2ruby.process(sexp) end
Version data entries
45 entries across 45 versions & 2 rubygems