view python/ppci/common.py @ 172:5a7d37d615ee

Added function to IR
author Windel Bouwman
date Thu, 04 Apr 2013 17:58:37 +0200
parents 8104fc8b5e90
children 6b2bec5653f1
line wrap: on
line source


from collections import namedtuple

#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'])