need @twneale to help me out. brodawg.
This commit is contained in:
parent
ae3f30b5e9
commit
1bb84ebc10
21
hy/compiler/ast27.py
Normal file
21
hy/compiler/ast27.py
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user