Adding FunctionDef as a returnable
This commit is contained in:
parent
1d01d8874a
commit
65ad7a3b87
@ -75,6 +75,12 @@ class HyASTCompiler(object):
|
|||||||
ret.append(ast.Return(value=el,
|
ret.append(ast.Return(value=el,
|
||||||
lineno=el.lineno,
|
lineno=el.lineno,
|
||||||
col_offset=el.col_offset))
|
col_offset=el.col_offset))
|
||||||
|
if isinstance(el, ast.FunctionDef):
|
||||||
|
ret.append(ast.Return(
|
||||||
|
value=ast.Name(
|
||||||
|
arg=el.name, id=el.name, ctx=ast.Load(),
|
||||||
|
lineno=el.lineno, col_offset=el.col_offset),
|
||||||
|
lineno=el.lineno, col_offset=el.col_offset))
|
||||||
|
|
||||||
for el in tree:
|
for el in tree:
|
||||||
if isinstance(el, ast.stmt):
|
if isinstance(el, ast.stmt):
|
||||||
|
Loading…
Reference in New Issue
Block a user