Remove IsScope in favor of an is_scope function.
This function was partially implemented anway. Now we've also added a function called 'get_parent_scope', to make it easy to get a scope of a Call, Statement, whatever.
This commit is contained in:
1 parent
1865284fa9
commit
33e5a3280a
8 files changed
+53
-27
No files matched your search
+1
-1
@@ -360,7 +360,7 @@ class BaseDefinition(object):
|
||||
if isinstance(self._definition, compiled.CompiledObject):
|
||||
non_flow = self._definition.parent
|
||||
else:
|
||||
scope = self._definition.get_parent_until(pr.IsScope, include_current=False)
|
||||
scope = self._definition.get_parent_scope(include_current=False)
|
||||
non_flow = scope.get_parent_until(pr.Flow, reverse=True)
|
||||
return Definition(self._evaluator, non_flow)
|
||||
|
||||
|
||||
Reference in new issue
Block a user