annotate python/ppci/common.py @ 169:ee0d30533dae
Added more tests and improved the diagnostic update
author |
Windel Bouwman |
date |
Sat, 23 Mar 2013 18:34:41 +0100 |
parents |
8104fc8b5e90 |
children |
6b2bec5653f1 |
rev |
line source |
153
|
1
|
|
2 from collections import namedtuple
|
|
3
|
163
|
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
|
153
|
11 SourceRange = namedtuple('SourceRange', ['p1', 'p2'])
|
|
12
|