Commit dc44b46f authored by Henning Glawe's avatar Henning Glawe
Browse files

remove value_str from token class

parent 1b8dd2fd
......@@ -37,12 +37,11 @@ class token(object):
self.match = self.regex.match(line, pos_in_line)
if self.match is None:
raise TokenMatchError
self.value_str = self.match.group(0)
self.value = self.match2value()
def highlighted(self):
"""return ANSI-highlighted token"""
m = self.cRE_end_newline.match(self.value_str)
m = self.cRE_end_newline.match(self.match.group(0))
return self.highlight_start + m.group(1) + self.highlight_end + m.group(2)
def match2value(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment