Sha256: 2ca19f253bdf6135e24e135ecb5cba420dcb35ba82c21dc7d3979b9107f26605

Contents?: true

Size: 281 Bytes

Versions: 15

Compression:

Stored size: 281 Bytes

Contents

#!/usr/bin/env ruby

require 'to_source'

ARGV.each do |path|
  source = File.read(path)
  ast = source.to_ast
  next if ast.nil? # When file only has comments
  $stderr.puts(path)
  begin 
    $stdout.puts(ToSource.to_source(ast))
  rescue
    ast.ascii_graph
    raise
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
to_source-0.2.15 bin/to_source
to_source-0.2.14 bin/to_source
to_source-0.2.13 bin/to_source
to_source-0.2.12 bin/to_source
to_source-0.2.11 bin/to_source
to_source-0.2.9 bin/to_source
to_source-0.2.8 bin/to_source
to_source-0.2.7 bin/to_source
to_source-0.2.6 bin/to_source
to_source-0.2.5 bin/to_source
to_source-0.2.4 bin/to_source
to_source-0.2.3 bin/to_source
to_source-0.2.2 bin/to_source
to_source-0.2.1 bin/to_source
to_source-0.2.0 bin/to_source