summaryrefslogtreecommitdiff
path: root/tokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'tokens.py')
-rw-r--r--tokens.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tokens.py b/tokens.py
index d476d49..84c6847 100644
--- a/tokens.py
+++ b/tokens.py
@@ -270,3 +270,15 @@ class CommentToken(Token):
except: # NOQA
pass
return 'CommentToken({})'.format(v)
+
+ def __eq__(self, other):
+ if self.start_mark != other.start_mark:
+ return False
+ if self.end_mark != other.end_mark:
+ return False
+ if self.value != other.value:
+ return False
+ return True
+
+ def __ne__(self, other):
+ return not self.__eq__(other)