mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
Enhance the output of Token.__repr__ a bit in the generated library
Change-Id: I039ee57170948c4a8a19e19ecf49df256c434cf8 TN: P428-014
This commit is contained in:
@@ -316,7 +316,10 @@ class Token(ctypes.Structure):
|
||||
return self._sloc_range.wrap()
|
||||
|
||||
def __repr__(self):
|
||||
return "<Token {}>".format(self.text)
|
||||
return '<Token {}{}>'.format(
|
||||
self.kind,
|
||||
' {}'.format(repr(self.text)) if self.text else ''
|
||||
)
|
||||
|
||||
|
||||
class Sloc(object):
|
||||
|
||||
Reference in New Issue
Block a user