示例#1
0
    def __link_type(self, type_id):
        if type_id is None:
            # in some situations type_id is None, return_type of constructor or
            # destructor
            return None
        elif type_id in self.__types:
            return self.__types[type_id]
        elif type_id in self.__decls:
            base = declarations.declarated_t(declaration=self.__decls[type_id])
            self.__types[type_id] = base
            return base
        elif type_id == '...':
            return declarations.ellipsis_t()

        return declarations.unknown_t()
示例#2
0
 def __link_type(self, type_id):
     if type_id is None:
         # in some situations type_id is None, return_type of constructor or
         # destructor
         return None
     elif type_id in self.__types:
         return self.__types[type_id]
     elif type_id in self.__decls:
         base = declarations.declarated_t(declaration=self.__decls[type_id])
         self.__types[type_id] = base
         return base
     elif '...' == type_id:
         return declarations.ellipsis_t()
     else:
         return declarations.unknown_t()