Allow (do) inside (defn)

Closes #59
This commit is contained in:
Nicolas Dandrimont 2013-04-04 08:51:59 +02:00
parent 99f62fb8b3
commit 940afcafa9

View File

@ -67,7 +67,7 @@ class HyASTCompiler(object):
if self.returnable and len(tree) > 0:
el = tree[0]
if not isinstance(el, ast.stmt):
if not isinstance(el, (ast.stmt, list)):
el = tree.pop(0)
ret.append(ast.Return(value=el,
lineno=el.lineno,