Mercurial > lcfOS
diff python/ppci/common.py @ 163:8104fc8b5e90
Added visitor to c3
author | Windel Bouwman |
---|---|
date | Mon, 18 Mar 2013 20:13:57 +0100 |
parents | e05b2b216bfc |
children | 6b2bec5653f1 |
line wrap: on
line diff
--- a/python/ppci/common.py Sun Mar 10 11:36:55 2013 +0100 +++ b/python/ppci/common.py Mon Mar 18 20:13:57 2013 +0100 @@ -1,6 +1,12 @@ from collections import namedtuple -SourceLocation = namedtuple('SourceLocation', ['row', 'col']) +#SourceLocation = namedtuple('SourceLocation', ['row', 'col']) +class SourceLocation: + def __init__(self, row, col, ln): + self.row = row + self.col = col + self.length = ln + SourceRange = namedtuple('SourceRange', ['p1', 'p2'])