hy/bin/hy2py

21 lines
367 B
Plaintext
Raw Normal View History

2013-03-06 00:16:04 +01:00
#!/usr/bin/env python
2013-03-09 00:18:43 +01:00
from hy.importer import (import_file_to_ast, import_file_to_module,
import_file_to_hst)
2013-03-06 00:16:04 +01:00
import codegen
import sys
2013-03-06 03:42:54 +01:00
import ast
2013-03-06 00:16:04 +01:00
2013-03-09 00:18:43 +01:00
hst = import_file_to_hst(sys.argv[1])
print hst
print ""
print ""
_ast = import_file_to_ast(sys.argv[1])
print ""
print ""
2013-03-06 03:42:54 +01:00
print ast.dump(_ast)
2013-03-09 00:18:43 +01:00
print ""
print ""
2013-03-06 03:42:54 +01:00
print codegen.to_source(_ast)