Sha256: 12820aedbef8c0d7e95c5c72e03ab8911b9ccf9db437bcd277b74370c8b1e383

Contents?: true

Size: 260 Bytes

Versions: 2

Compression:

Stored size: 260 Bytes

Contents

#!/usr/bin/env ruby

require 'ast2dot'
require 'optparse'

opt_parse = OptionParser.new do |opt|
  opt.banner = 'Usage: ast2dot ruby_programfile'
  opt.parse!(ARGV)
end

if ARGV.first.nil?
  puts opt_parse
else
  puts AST2Dot.render(File.read(ARGV.first))
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ast2dot-0.1.1 exe/ast2dot
ast2dot-0.1.0 exe/ast2dot