Mercurial > lcfOS
diff python/ppci/c3/astnodes.py @ 336:d1ecc493384e
Added spiffy armtoken class for bit fiddeling. Added cool test that checks for build repeatability
author | Windel Bouwman |
---|---|
date | Wed, 19 Feb 2014 22:32:15 +0100 |
parents | 56e6ff84f646 |
children | 5477e499b039 |
line wrap: on
line diff
--- a/python/ppci/c3/astnodes.py Mon Feb 17 20:41:30 2014 +0100 +++ b/python/ppci/c3/astnodes.py Wed Feb 19 22:32:15 2014 +0100 @@ -37,6 +37,11 @@ self.declarations = [] self.imports = [] + def add_declaration(self, decl): + self.declarations.append(decl) + if isinstance(decl, Function): + decl.package = self + def __repr__(self): return 'MODULE {}'.format(self.name) @@ -174,6 +179,9 @@ self.loc = loc self.declarations = [] + def add_declaration(self, decl): + self.declarations.append(decl) + def __repr__(self): return 'Func {}'.format(self.name)