Skip to content

Commit d41cd52

Browse files
committed
feat(CodePosition): add file_name prop.
Nic30/hdlConvertor#191
1 parent 43a48d2 commit d41cd52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hdlConvertorAst/hdlAst/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
class CodePosition(object):
44
__slots__ = [
5+
"file_name",
56
"start_line",
67
"start_column",
78
"stop_line",
89
"stop_column",
910
]
1011

1112
def __init__(self):
13+
self.file_name = None
1214
self.start_line = None
1315
self.start_column = None
1416
self.stop_line = None
1517
self.stop_column = None
1618

1719
def __repr__(self):
18-
return "<%s %r:%r to %r:%r>" % (self.__class__.__name__,
20+
return "<%s %r:%r to %r:%r>" % (self.__class__.__name__, self.file_name,
1921
self.start_line, self.start_column,
2022
self.stop_line, self.stop_column)

0 commit comments

Comments
 (0)