Parses the specified line as a new version of the signature for 'element'.

        :arg statement: the string that has the new signature.
        :arg element: the code element whose signature will be changed.

def parse_signature(self, statement, element, module=None):
        """Parses the specified line as a new version of the signature for 'element'.

        :arg statement: the string that has the new signature.
        :arg element: the code element whose signature will be changed.
        """
        #If the signature changes, the user might not have had a chance to add the
        #detailed member information for it yet. Here
        #we will just update the modifiers and attributes. Also, since all the mods
        #etc. will be overwritten, we don't need to handle replace separately.
        smatch = self.RE_SIG.match(statement)
        result = (None, None, None)
        eresult = None

        if smatch is not None:
            name = smatch.group("name").strip()
            modifiers = smatch.group("modifiers") or []
            codetype = smatch.group("codetype")

            #If the exec is a function, we also may have a type and kind specified.
            if codetype.lower() == "function":
                dtype = smatch.group("type")
                kind = smatch.group("kind")
                if module is None:
                    element.update(name, modifiers, dtype, kind)
                else:
                    eresult = Function(name, modifiers, dtype, kind, module)
            else:
                if module is None:
                    element.update(name, modifiers)
                else:
                    eresult = Subroutine(name, modifiers, module)

            #The parameter sets are actually driven by the body of the executable 
            #rather than the call signature. However, the declarations will be
            #interpreted as members if we don't add the parameters to the ordered
            #list of parameter names. Overwrite that list with the new names.
            params = re.split("[\s,]+", smatch.group("parameters").lower())
            if eresult is None:
                element.paramorder = params
            else:
                eresult.paramorder = params

            result = (eresult, smatch.start(), smatch.end())

        return result