Extend the type-hinsting parser to recognise class methods as well.