parent
0defded454
commit
6f6a666d99
5
lex.py
5
lex.py
|
@ -49,12 +49,13 @@ class Token(object):
|
|||
self.string += s
|
||||
def end_x(self):
|
||||
return self.x + len(self.string)
|
||||
# note that if parent is not none, then this is recursive
|
||||
def __eq__(self, other):
|
||||
return (other is not None and
|
||||
self.y == other.y and self.x == other.x and
|
||||
self.name == other.name and
|
||||
self.parent == other.parent and
|
||||
self.string == other.string)
|
||||
self.string == other.string and
|
||||
self.parent == other.parent)
|
||||
def __repr__(self):
|
||||
if len(self.string) < 10:
|
||||
s = self.string
|
||||
|
|
Loading…
Reference in New Issue