1
0
forked from VimPlug/jedi

Make goto work with await

Created together with @langsamer and @davidhalter
This commit is contained in:
Robin Roth
2017-10-28 13:34:25 +02:00
committed by Dave Halter
parent 752b7d8d49
commit 88cf592c95
4 changed files with 19 additions and 1 deletions

View File

@@ -249,6 +249,8 @@ class Evaluator(object):
else:
i = trailer.parent.children.index(trailer)
to_evaluate = trailer.parent.children[:i]
if to_evaluate[0] == 'await':
to_evaluate.pop(0)
context_set = context.eval_node(to_evaluate[0])
for trailer in to_evaluate[1:]:
context_set = eval_trailer(context, context_set, trailer)

View File

@@ -89,6 +89,10 @@ def evaluate_call_of_leaf(context, leaf, cut_own_trailer=False):
base = power.children[0]
trailers = power.children[1:cut]
if base == 'await':
base = trailers[0]
trailers = trailers[1:]
values = context.eval_node(base)
from jedi.evaluate.syntax_tree import eval_trailer
for trailer in trailers: