1
0
forked from VimPlug/jedi

replace parser tokenizer offset with line offset

This commit is contained in:
Dave Halter
2014-02-17 23:02:04 +01:00
parent 6952596117
commit 1b6df4602d
2 changed files with 7 additions and 19 deletions

View File

@@ -233,6 +233,9 @@ class Script(object):
stmt = r.module.statements[0]
except IndexError:
raise NotFoundError()
# Set the start_pos to a pseudo position, that doesn't exist but works
# perfectly well (for both completions in docstrings and statements).
stmt.start_pos = self._pos
stmt.parent = self._parser.user_scope()
return stmt