replace parser tokenizer offset with line offset

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

No files matched your search

+3
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