As part of parse_line(), checks for new type declarations in the statement.

def _rt_parse_types(self, statement, element, mode, lineparser):
        """As part of parse_line(), checks for new type declarations in the statement."""
        if mode == "insert":
            #Since we got to this point, there is *no* code element that owns the current
            #line which is being replaced; we are merely checking to see if the new line
            #being entered matches a type definition, do the same thing as "insert"
            tnew, start, end = self.tparser.parse_signature(statement, element, element)
            #We need to set sensible boundaries for 'start' and 'end' so that if the lines
            #immediately after this one are member definitions (for example) they get
            #associated correctly with this type.
            if tnew is not None:
                tnew.start, tnew.end = lineparser.absolute_charindex(statement, start, end)
                tnew.incomplete = True
                element.types[tnew.name.lower()] = tnew
                lineparser.additions.append((tnew, element))