Mercurial > lcfOS
diff python/c3/analyse.py @ 166:da0087b82fbe
Improved type checking
author | Windel Bouwman |
---|---|
date | Fri, 22 Mar 2013 16:15:31 +0100 |
parents | 8104fc8b5e90 |
children | 0b5b2ee6b435 |
line wrap: on
line diff
--- a/python/c3/analyse.py Fri Mar 22 15:12:38 2013 +0100 +++ b/python/c3/analyse.py Fri Mar 22 16:15:31 2013 +0100 @@ -22,7 +22,7 @@ def a1(self, sym): pass def analyze(self, sym): - if type(sym) is Variable: + if type(sym) in [Variable, Constant]: sym.typ = self.resolveDesignator(sym.typ, sym) elif type(sym) is VariableUse: sym.target = self.resolveDesignator(sym.target, sym) @@ -30,6 +30,4 @@ sym.proc = self.resolveDesignator(sym.proc, sym) elif type(sym) is FunctionType: sym.returntype = self.resolveDesignator(sym.returntype) - elif type(sym) is Constant: - print(sym)