Mercurial > lcfOS
diff python/ppci/c3/astnodes.py @ 389:2ec730e45ea1
Added check for recursive struct
author | Windel Bouwman |
---|---|
date | Fri, 16 May 2014 12:29:31 +0200 |
parents | 5477e499b039 |
children | 6ae782a085e0 |
line wrap: on
line diff
--- a/python/ppci/c3/astnodes.py Fri May 02 14:51:46 2014 +0200 +++ b/python/ppci/c3/astnodes.py Fri May 16 12:29:31 2014 +0200 @@ -5,8 +5,6 @@ Finally code is generated from it. """ -from ppci import SourceLocation - class Node: """ Base class of all nodes in a AST """ @@ -42,6 +40,10 @@ if isinstance(decl, Function): decl.package = self + @property + def Types(self): + return self.innerScope.Types + def __repr__(self): return 'MODULE {}'.format(self.name) @@ -96,6 +98,9 @@ self.name = name self.typ = typ + def __repr__(self): + return 'Member {}'.format(self.name) + class StructureType(Type): """ Struct type consisting of several named members """