forked from VimPlug/jedi
fix an invalid statement that has changed because of changes to the parser.
This commit is contained in:
@@ -231,7 +231,8 @@ class Script(object):
|
|||||||
tokenizer = source_tokens(cursor_txt, self._pos[0] - 1)
|
tokenizer = source_tokens(cursor_txt, self._pos[0] - 1)
|
||||||
r = Parser(cursor_txt, no_docstr=True, tokenizer=tokenizer)
|
r = Parser(cursor_txt, no_docstr=True, tokenizer=tokenizer)
|
||||||
try:
|
try:
|
||||||
stmt = r.module.statements[0]
|
# Take the last statement available.
|
||||||
|
stmt = r.module.statements[-1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise NotFoundError()
|
raise NotFoundError()
|
||||||
# Set the start_pos to a pseudo position, that doesn't exist but works
|
# Set the start_pos to a pseudo position, that doesn't exist but works
|
||||||
|
|||||||
@@ -137,8 +137,8 @@ def break(): pass
|
|||||||
#? int()
|
#? int()
|
||||||
a[0]
|
a[0]
|
||||||
|
|
||||||
#? []
|
#? ['real']
|
||||||
int()).
|
int()).real
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# keywords
|
# keywords
|
||||||
|
|||||||
Reference in New Issue
Block a user