forked from M-Labs/artiq
inline: return statements
This commit is contained in:
parent
c021b2ef41
commit
792ac44245
|
@ -1,7 +1,6 @@
|
|||
from collections import namedtuple, defaultdict
|
||||
import inspect, textwrap, ast, builtins
|
||||
|
||||
from artiq.compiler import unparse
|
||||
from artiq.compiler.tools import eval_ast
|
||||
from artiq.language import experiment, units
|
||||
|
||||
|
@ -181,4 +180,4 @@ def inline(k_function, k_args, k_kwargs, rm=None):
|
|||
|
||||
funcdef.body[0:0] = param_init
|
||||
|
||||
unparse.Unparser(funcdef.body)
|
||||
return funcdef.body
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from artiq.compiler.inline import inline
|
||||
from artiq.compiler.unparse import Unparser
|
||||
|
||||
class Core:
|
||||
def run(self, k_function, k_args, k_kwargs):
|
||||
inline(k_function, k_args, k_kwargs)
|
||||
stmts = inline(k_function, k_args, k_kwargs)
|
||||
Unparser(stmts)
|
||||
|
|
Loading…
Reference in New Issue