refactor general array lookup method get_index_types
This commit is contained in:
1 parent
70d85d1b3a
commit
b6ec589997
6 files changed
+28
-19
No files matched your search
@@ -275,8 +275,11 @@ class Evaluator(object):
|
||||
# This must be an execution, either () or [].
|
||||
if current.type == pr.Array.LIST:
|
||||
if hasattr(typ, 'get_index_types'):
|
||||
slc = iterable.create_indexes_or_slices(self, current)
|
||||
result = typ.get_index_types(slc)
|
||||
if isinstance(typ, compiled.CompiledObject):
|
||||
# CompiledObject doesn't contain an evaluator instance.
|
||||
result = typ.get_index_types(self, current)
|
||||
else:
|
||||
result = typ.get_index_types(current)
|
||||
elif current.type not in [pr.Array.DICT]:
|
||||
# Scope must be a class or func - make an instance or execution.
|
||||
result = self.execute(typ, current)
|
||||
|
||||
Reference in new issue
Block a user