replace parser tokenizer offset with line offset
This commit is contained in:
1 parent
6952596117
commit
1b6df4602d
2 files changed
+7
-19
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user