forked from VimPlug/jedi
add an execute method to the evaluator
This commit is contained in:
@@ -642,7 +642,7 @@ class Evaluator(object):
|
|||||||
elif current.type not in [pr.Array.DICT]:
|
elif current.type not in [pr.Array.DICT]:
|
||||||
# Scope must be a class or func - make an instance or execution.
|
# Scope must be a class or func - make an instance or execution.
|
||||||
debug.dbg('exe', scope)
|
debug.dbg('exe', scope)
|
||||||
result = er.Execution(scope, current).get_return_types()
|
result = self.execute(scope, current)
|
||||||
else:
|
else:
|
||||||
# Curly braces are not allowed, because they make no sense.
|
# Curly braces are not allowed, because they make no sense.
|
||||||
debug.warning('strange function call with {}', current, scope)
|
debug.warning('strange function call with {}', current, scope)
|
||||||
@@ -658,6 +658,9 @@ class Evaluator(object):
|
|||||||
position=position))
|
position=position))
|
||||||
return self.follow_paths(path, set(result), call_scope, position=position)
|
return self.follow_paths(path, set(result), call_scope, position=position)
|
||||||
|
|
||||||
|
def execute(self, scope, params):
|
||||||
|
return er.Execution(scope, params).get_return_types()
|
||||||
|
|
||||||
def goto(self, stmt, call_path=None):
|
def goto(self, stmt, call_path=None):
|
||||||
if call_path is None:
|
if call_path is None:
|
||||||
commands = stmt.get_commands()
|
commands = stmt.get_commands()
|
||||||
|
|||||||
Reference in New Issue
Block a user