mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-12-23 09:45:13 +01:00
Enable rules mixing functions with scriptlets
This commit is contained in:
parent
0e76f676be
commit
201b8ac38f
@ -1081,9 +1081,13 @@ def compile_fun(line, shell=False):
|
|||||||
dvars_lst = []
|
dvars_lst = []
|
||||||
funs_lst = []
|
funs_lst = []
|
||||||
for x in line:
|
for x in line:
|
||||||
fun, dvars = compile_fun(x, shell)
|
if isinstance(x, str):
|
||||||
dvars_lst += dvars
|
fun, dvars = compile_fun(x, shell)
|
||||||
funs_lst.append(fun)
|
dvars_lst += dvars
|
||||||
|
funs_lst.append(fun)
|
||||||
|
else:
|
||||||
|
# assume a function to let through
|
||||||
|
funs_lst.append(x)
|
||||||
def composed_fun(task):
|
def composed_fun(task):
|
||||||
for x in funs_lst:
|
for x in funs_lst:
|
||||||
ret = x(task)
|
ret = x(task)
|
||||||
|
Loading…
Reference in New Issue
Block a user