14 lines
263 B
Python
Executable File
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)
|