mirror of
https://github.com/davidhalter/jedi.git
synced 2026-09-07 01:37:18 +08:00
Fix prefixes of Leafs.
This commit is contained in:
@@ -312,11 +312,12 @@ class Leaf(Base):
|
|||||||
"""
|
"""
|
||||||
assert 0 <= type < 256, type
|
assert 0 <= type < 256, type
|
||||||
if context is not None:
|
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.type = type
|
||||||
self.value = value
|
self.value = value
|
||||||
# The whitespace and comments preceding this token in the input.
|
|
||||||
self.prefix = prefix or ''
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
"""Return a canonical string representation."""
|
"""Return a canonical string representation."""
|
||||||
|
|||||||
Reference in New Issue
Block a user