Mercurial > lcfOS
diff python/ppci/ir.py @ 354:5477e499b039
Added some sort of string functionality
author | Windel Bouwman |
---|---|
date | Thu, 13 Mar 2014 18:59:06 +0100 |
parents | d1ecc493384e |
children | 396e5cefba13 |
line wrap: on
line diff
--- a/python/ppci/ir.py Sun Mar 09 18:49:10 2014 +0100 +++ b/python/ppci/ir.py Thu Mar 13 18:59:06 2014 +0100 @@ -214,7 +214,7 @@ self.arguments = arguments def __repr__(self): - args = ', '.join([str(arg) for arg in self.arguments]) + args = ', '.join(str(arg) for arg in self.arguments) return '{}({})'.format(self.f, args) @@ -309,6 +309,15 @@ return '[{}]'.format(self.e) +class Addr(Expression): + """ Address of label """ + def __init__(self, e): + self.e = e + + def __repr__(self): + return '&{}'.format(self.e) + + class Statement: """ Base class for all instructions. """ @property