Pedwardine, cats will purr even with terrible injuries, I think they do it to comfort themselves as though they remember their mother purring whilst feeding them.
When OH and I joined forces twenty years ago he brought with him two cats. They lived 'til a ripe old age but one I thought had become fussy about her food, though she still purred when on a lap. I tried all sorts of things to try to tempt her and she would go to her dish as though hungry, then after a taste would walk away.
I'm ashamed to say that I got cross with her until I noticed that her tongue was sticking out. On opening her mouth I discovered a huge tumour in her mouth. Poor little soul couldn't eat and must have been suffering dreadfully but never complained. This could be something you could check for?
I hope it's not something awful and that she dies in her sleep, warm and well fed.