1
0
forked from VimPlug/jedi

Fix prefixes of Leafs.

This commit is contained in:
Dave Halter
2014-10-08 15:19:36 +02:00
parent 36368cd606
commit 1fb6e15750

View File

@@ -312,11 +312,12 @@ class Leaf(Base):
"""
assert 0 <= type < 256, type
if context is not None:
self._prefix, (self.lineno, self.column) = context
self.prefix, (self.lineno, self.column) = context
if prefix is not None:
# The whitespace and comments preceding this token in the input.
self.prefix = prefix
self.type = type
self.value = value
# The whitespace and comments preceding this token in the input.
self.prefix = prefix or ''
def __repr__(self):
"""Return a canonical string representation."""