def Function(self, attrs): # name, returns, extern, attributes name = attrs["name"] returns = attrs["returns"] attributes = attrs.get("attributes", "").split() extern = attrs.get("extern") return typedesc.Function(name, returns, attributes, extern)
def FUNCTION_DECL(self, cursor): """Handles function declaration""" # FIXME to UT name = self.get_unique_name(cursor) if self.is_registered(name): return self.get_registered(name) returns = self.parse_cursor_type(cursor.type.get_result()) attributes = [] extern = False obj = typedesc.Function(name, returns, attributes, extern) for arg in cursor.get_arguments(): arg_obj = self.parse_cursor(arg) # if arg_obj is None: # code.interact(local=locals()) obj.add_argument(arg_obj) # code.interact(local=locals()) self.register(name, obj) self.set_location(obj, cursor) self.set_comment(obj, cursor) return obj