From 1bb84ebc10536a08df8ee90d017db689aa12a014 Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Sat, 22 Dec 2012 00:21:25 -0500 Subject: [PATCH] need @twneale to help me out. brodawg. --- hy/compiler/ast27.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 hy/compiler/ast27.py diff --git a/hy/compiler/ast27.py b/hy/compiler/ast27.py new file mode 100644 index 0000000..cbdbbce --- /dev/null +++ b/hy/compiler/ast27.py @@ -0,0 +1,21 @@ +# output ast for cpython 2.7 + +from hy.lang.builtins import builtins +# check compiler/modfaker for other crap + +offset = 0 +def _new_fn_name(): + global offset + offset += 1 + return "_hy_fn_%s" % (offset) + +# body=[Print(dest=None, +# values=[BinOp(left=Num(n=1), op=Add(), right=Num(n=1))], +# nl=True)] +# body=[Expr(value=BinOp(left=Num(n=1), op=Add(), right=Num(n=1)))] + + + +def forge_ast(name, forest): + for tree in forest: + print tree