Fix params, so that quite a few functions can now pass.

This commit is contained in:
Dave Halter
2014-10-25 02:35:04 +02:00
parent 4384e938e9
commit 995f0700c9
2 changed files with 3 additions and 3 deletions

View File

@@ -87,7 +87,6 @@ class NameFinder(object):
stmt = name.get_definition()
scope = stmt.parent
print(name.parent, stmt, scope)
if scope in break_scopes:
continue
@@ -342,7 +341,8 @@ class NameFinder(object):
# this means that there are no default params,
# so just ignore it.
return res_new
return res_new + evaluator.eval_statement(param, seek_name=unicode(self.name_str))
return res_new + list(chain.from_iterable(evaluator.eval_element(v)
for v in param.values))
def _handle_for_loops(self, loop):
# Take the first statement (for has always only one`in`).

View File

@@ -431,7 +431,7 @@ def _gen_param_name_copy(evaluator, func, var_args, param, keys=(), values=(), a
arr.type = array_type
"""
new_param = ExecutedParam.from_param([arr], param, parent, var_args)
new_param = ExecutedParam.from_param(values, param, parent, var_args)
name = copy.copy(param.get_name())