Mercurial > lcfOS
comparison 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 |
comparison
equal
deleted
inserted
replaced
166:da0087b82fbe | 167:0b5b2ee6b435 |
---|---|
22 def a1(self, sym): | 22 def a1(self, sym): |
23 pass | 23 pass |
24 def analyze(self, sym): | 24 def analyze(self, sym): |
25 if type(sym) in [Variable, Constant]: | 25 if type(sym) in [Variable, Constant]: |
26 sym.typ = self.resolveDesignator(sym.typ, sym) | 26 sym.typ = self.resolveDesignator(sym.typ, sym) |
27 elif type(sym) is Function: | |
28 pass | |
27 elif type(sym) is VariableUse: | 29 elif type(sym) is VariableUse: |
28 sym.target = self.resolveDesignator(sym.target, sym) | 30 sym.target = self.resolveDesignator(sym.target, sym) |
29 elif type(sym) is ProcedureCall: | 31 elif type(sym) is FunctionCall: |
30 sym.proc = self.resolveDesignator(sym.proc, sym) | 32 sym.proc = self.resolveDesignator(sym.proc, sym) |
31 elif type(sym) is FunctionType: | 33 elif type(sym) is FunctionType: |
32 sym.returntype = self.resolveDesignator(sym.returntype) | 34 sym.returntype = self.resolveDesignator(sym.returntype) |
35 sym.parametertypes = [self.resolveDesignator(pt) for pt in sym.parametertypes] | |
33 | 36 |