forked from dhvanipa/error_deep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Token.py
24 lines (21 loc) · 1017 Bytes
/
Token.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Copyright 2017 Dhvani Patel
class Token():
def __init__(self, type, value, srow, scol, erow, ecol, line):
self.type = type
self.value = value
self.srow = srow
self.scol = scol
self.erow = erow
self.ecol = ecol
self.line = line
def __eq__(self, other) :
if self.type == other.type:
if self.value == other.value:
if self.srow == other.srow:
if self.scol == other.scol:
if self.erow == other.erow:
if self.ecol == other.ecol:
if self.line == other.line:
return True
else:
return False