fixed some array indexing

This commit is contained in:
Dave Halter
2014-01-09 19:55:00 +01:00
parent 0234c1429b
commit 9056dc1b9b
4 changed files with 16 additions and 24 deletions
+5 -9
View File
@@ -307,16 +307,12 @@ class Evaluator(object):
else:
if isinstance(current, pr.NamePart):
# This is the first global lookup.
scopes = self.find_types(scope, current, position=position,
search_global=True)
types = self.find_types(scope, current, position=position,
search_global=True)
else:
# for pr.Literal
scopes = self.find_types(compiled.builtin, current.type_as_string())
# Make instances of those number/string objects.
scopes = itertools.chain.from_iterable(
self.execute(s, (current.value,)) for s in scopes
)
types = imports.strip_imports(self, scopes)
types = [compiled.create(current.value)]
types = imports.strip_imports(self, types)
return self.follow_path(path, types, scope, position=position)
@@ -412,7 +408,7 @@ class Evaluator(object):
else:
stmts = er.FunctionExecution(self, obj, params).get_return_types(evaluate_generator)
debug.dbg('execute: %s in %s' % (stmts, self))
debug.dbg('execute: %s in %s' % (stmts, obj))
return imports.strip_imports(self, stmts)
def goto(self, stmt, call_path=None):