diff python/c3/analyse.py @ 167:0b5b2ee6b435

Added 2 unit tests
author Windel Bouwman
date Fri, 22 Mar 2013 17:40:13 +0100
parents da0087b82fbe
children 46d62dadd61b
line wrap: on
line diff
--- a/python/c3/analyse.py	Fri Mar 22 16:15:31 2013 +0100
+++ b/python/c3/analyse.py	Fri Mar 22 17:40:13 2013 +0100
@@ -24,10 +24,13 @@
    def analyze(self, sym):
       if type(sym) in [Variable, Constant]:
          sym.typ = self.resolveDesignator(sym.typ, sym)
+      elif type(sym) is Function:
+         pass
       elif type(sym) is VariableUse:
          sym.target = self.resolveDesignator(sym.target, sym)
-      elif type(sym) is ProcedureCall:
+      elif type(sym) is FunctionCall:
          sym.proc = self.resolveDesignator(sym.proc, sym)
       elif type(sym) is FunctionType:
          sym.returntype = self.resolveDesignator(sym.returntype)
+         sym.parametertypes = [self.resolveDesignator(pt) for pt in sym.parametertypes]