X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e74117f172e29e8a980e2c9de929ad50d3769150..e36b8c71bb78f70735b8b4f239b0f574a6e0f277:/blib2to3/pgen2/driver.py?ds=inline diff --git a/blib2to3/pgen2/driver.py b/blib2to3/pgen2/driver.py index cbc58e7..cc7b415 100644 --- a/blib2to3/pgen2/driver.py +++ b/blib2to3/pgen2/driver.py @@ -69,11 +69,16 @@ class Driver(object): if debug: self.logger.debug("%s %r (prefix=%r)", token.tok_name[type], value, prefix) + if type in {token.INDENT, token.DEDENT}: + _prefix = prefix + prefix = "" if p.addtoken(type, value, (prefix, start)): if debug: self.logger.debug("Stop.") break prefix = "" + if type in {token.INDENT, token.DEDENT}: + prefix = _prefix lineno, column = end if value.endswith("\n"): lineno += 1