Mercurial > lcfOS
diff python/c3/analyse.py @ 225:1c7364bd74c7
Fixed pointer deref
author | Windel Bouwman |
---|---|
date | Thu, 11 Jul 2013 07:42:30 +0200 |
parents | c3f1ce8b638f |
children | 240111e0456f |
line wrap: on
line diff
--- a/python/c3/analyse.py Tue Jul 09 17:59:15 2013 +0200 +++ b/python/c3/analyse.py Thu Jul 11 07:42:30 2013 +0200 @@ -44,6 +44,8 @@ # Add symbols to current scope: if isinstance(sym, Symbol): self.addSymbol(sym) + if isinstance(sym, DefinedType): + self.addSymbol(sym) # Create subscope: if type(sym) in [Package, Function]: @@ -78,8 +80,11 @@ return t elif type(t) is Designator: return self.resolveDesignator(t, scope) + elif isinstance(t, Type): + # Already resolved?? + return t else: - print('ERR resolve type!') + raise Exception('Error resolving type {} {}'.format(t, type(t))) def findRefs(self, sym): if type(sym) in [Variable, Constant]: