1
0
forked from VimPlug/jedi

Trying to move the indent/dedent logic back into the tokenizer.

This commit is contained in:
Dave Halter
2014-11-28 02:04:04 +01:00
parent 97516eb26b
commit e1d6511f2f
4 changed files with 14 additions and 18 deletions

View File

@@ -310,6 +310,7 @@ class Script(object):
if not isinstance(stmt, (pr.ExprStmt, pr.KeywordStatement)):
raise NotFoundError()
# TODO remove?
user_stmt = self._parser.user_stmt()
if user_stmt is None:
# Set the start_pos to a pseudo position, that doesn't exist but works
@@ -318,7 +319,7 @@ class Script(object):
else:
pos = user_stmt.start_pos
stmt.move(pos[0] - 1, pos[1])
#stmt.move(pos[0] - 1, pos[1])
stmt.parent = self._parser.user_scope()
return stmt