46,50d45
< class Method(object):
< def __init__(self, return_type, param_types):
< self.return_type = return_type
< self.param_types = param_types
<
99,100d93
<
< # Methods
102,104d94
< self.functions = {}
<
< # Enums
163,173d152
< def addMethod(self, name, return_type, param_type_vec):
< ident = self.methodId(name, param_type_vec)
< if ident in self.methods:
< return False
<
< self.methods[ident] = Method(return_type, param_type_vec)
< return True
<
< # Ideally either this function or the one above should exist. But
< # methods and functions have different structures right now.
< # Hence, these are different, at least for the time being.
176c155
< if ident in self.functions:
---
> if ident in self.methods:
179c158
< self.functions[ident] = func
---
> self.methods[ident] = func
382,384c361,363
< # Prototypes for functions defined for the Type
< for item in self.functions:
< proto = self.functions[item].prototype
---
> # Prototypes for methods defined for the Type
> for item in self.methods:
> proto = self.methods[item].prototype
445,447c424,426
< # print the code for the functions in the type
< for item in self.functions:
< code(self.functions[item].generateCode())
---
> # print the code for the methods in the type
> for item in self.methods:
> code(self.methods[item].generateCode())