1
0
forked from VimPlug/jedi

fix an invalid statement that has changed because of changes to the parser.

This commit is contained in:
Dave Halter
2014-03-09 11:56:29 +01:00
parent 35548cbf3c
commit 60ff2bc088
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -137,8 +137,8 @@ def break(): pass
#? int() #? int()
a[0] a[0]
#? [] #? ['real']
int()). int()).real
# ----------------- # -----------------
# keywords # keywords