/usr/lib/python2.7/dist-packages/stringtemplate3/language/ChunkToken.py is in python-stringtemplate3 3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import antlr
from stringtemplate3.utils import deprecated
class ChunkToken(antlr.CommonToken):
"""
Tracks the various string and attribute chunks discovered
by the lexer. Subclassed CommonToken so that I could pass
the indentation to the parser, which will add it to the
ASTExpr created for the $...$ attribute reference.
"""
def __init__(self, type = None, text = '', indentation = ''):
antlr.CommonToken.__init__(self, type=type, text=text)
self.indentation = indentation
@deprecated
def getIndentation(self):
return self.indentation
@deprecated
def setIndentation(self, indentation):
self.indentation = indentation
def __str__(self):
return (antlr.CommonToken.__str__(self) +
" <indent='%d'>" % self.indentation
)
|