comparison python/c3/analyse.py @ 222:c3f1ce8b638f

Fixup of parser
author Windel Bouwman
date Tue, 09 Jul 2013 17:36:31 +0200
parents 3f6c30a5d234
children 1c7364bd74c7
comparison
equal deleted inserted replaced
221:848c4b15fd0b 222:c3f1ce8b638f
82 print('ERR resolve type!') 82 print('ERR resolve type!')
83 83
84 def findRefs(self, sym): 84 def findRefs(self, sym):
85 if type(sym) in [Variable, Constant]: 85 if type(sym) in [Variable, Constant]:
86 sym.typ = self.resolveType(sym.typ, sym.scope) 86 sym.typ = self.resolveType(sym.typ, sym.scope)
87 elif type(sym) is TypeCast:
88 sym.to_type = self.resolveType(sym.to_type, sym.scope)
87 elif type(sym) is VariableUse: 89 elif type(sym) is VariableUse:
88 sym.target = self.resolveDesignator(sym.target, sym.scope) 90 sym.target = self.resolveDesignator(sym.target, sym.scope)
89 elif type(sym) is FunctionCall: 91 elif type(sym) is FunctionCall:
90 varuse = sym.proc 92 varuse = sym.proc
91 sym.proc = self.resolveDesignator(varuse.target, sym.scope) 93 sym.proc = self.resolveDesignator(varuse.target, sym.scope)