hy/bin/hy2py
Paul R. Tagliamonte 37a11247c7 Tweaking the AST.
2013-03-05 21:42:54 -05:00

14 lines
263 B
Python
Executable File

#!/usr/bin/env python
from hy.compiler import hy_compile
from hy.lex import tokenize
import codegen
import sys
import ast
tokens = tokenize(open(sys.argv[1], 'r').read())
print tokens
_ast = hy_compile(tokens)
print ast.dump(_ast)
print codegen.to_source(_ast)