def METHOD_NAME(self):
    text = self.text()
    result = None
    try:
        defs, typedefs = sim_type.parse_file(text, predefined_types=self._predefined_types)
        for k in list(typedefs):
            if k.startswith("struct ") and k[7:] in typedefs:
                typedefs.pop(k)
        result = list(typedefs.items()) + list(defs.items())
        result = [(name, ty.with_arch(self.arch)) for name, ty in result]
    except pycparser.plyparser.ParseError:
        pass
    # hack. idk why our pycparser config will accept `typedef int` as the same as `int`
    if result is None and not text.strip().startswith("typedef"):
        try:
            ty, name = sim_type.parse_type_with_name(text, predefined_types=self._predefined_types)
            result = [(name, ty.with_arch(self.arch))]
        except pycparser.plyparser.ParseError:
            pass
    if not result or (not self._allow_multiple and len(result) != 1):
        self._ok_button.setEnabled(False)
        self.result = []
    else:
        self._ok_button.setEnabled(True)
        self.result = result