Mercurial > lcfOS
comparison 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 |
comparison
equal
deleted
inserted
replaced
162:d8c735dc31f9 | 163:8104fc8b5e90 |
---|---|
1 | 1 |
2 from collections import namedtuple | 2 from collections import namedtuple |
3 | 3 |
4 SourceLocation = namedtuple('SourceLocation', ['row', 'col']) | 4 #SourceLocation = namedtuple('SourceLocation', ['row', 'col']) |
5 class SourceLocation: | |
6 def __init__(self, row, col, ln): | |
7 self.row = row | |
8 self.col = col | |
9 self.length = ln | |
10 | |
5 SourceRange = namedtuple('SourceRange', ['p1', 'p2']) | 11 SourceRange = namedtuple('SourceRange', ['p1', 'p2']) |
6 | 12 |