Pretty print the AST in hy2py
This commit is contained in:
parent
715158c7db
commit
9a128edcb2
@ -6,7 +6,6 @@ from hy.importer import (import_file_to_ast, import_file_to_module,
|
|||||||
|
|
||||||
import astor.codegen
|
import astor.codegen
|
||||||
import sys
|
import sys
|
||||||
import ast
|
|
||||||
|
|
||||||
module_name = "<STDIN>"
|
module_name = "<STDIN>"
|
||||||
|
|
||||||
@ -17,7 +16,7 @@ print("")
|
|||||||
_ast = import_file_to_ast(sys.argv[1], module_name)
|
_ast = import_file_to_ast(sys.argv[1], module_name)
|
||||||
print("")
|
print("")
|
||||||
print("")
|
print("")
|
||||||
print(ast.dump(_ast))
|
print(astor.dump(_ast))
|
||||||
print("")
|
print("")
|
||||||
print("")
|
print("")
|
||||||
print(astor.codegen.to_source(_ast))
|
print(astor.codegen.to_source(_ast))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user