1
0
forked from VimPlug/jedi

some minor fixes / inits to inputs refactoring

This commit is contained in:
David Halter
2013-02-17 22:48:41 +04:30
parent 779ce6509d
commit c67b9986a6
5 changed files with 26 additions and 22 deletions

View File

@@ -194,9 +194,10 @@ def check_array_additions(array):
def _scan_array(arr, search_name):
""" Returns the function Call that match search_name in an Array. """
print arr
result = []
for sub in arr:
for s in sub:
for stmt in arr:
for s in stmt.get_commands():
if isinstance(s, pr.Array):
result += _scan_array(s, search_name)
elif isinstance(s, pr.Call):
@@ -461,8 +462,8 @@ def check_flow_information(flow, search_name, pos):
break
if isinstance(flow, pr.Flow) and not result:
if flow.command in ['if', 'while'] and len(flow.inits) == 1:
result = check_statement_information(flow.inits[0], search_name)
if flow.command in ['if', 'while'] and len(flow.inputs) == 1:
result = check_statement_information(flow.inputs[0], search_name)
return result