18. " and repentance is not for those who go on doing evil deeds until
death comes to one of them, he says: `verily now i repent', nor for those
who die while they are disbelievers. those are they for whom we have
prepared a painful torment."

commentary:
those whose repentance is not accepted is referred to in this verse.
it says:

" and repentance is not for those who go on doing evil deeds until death
comes to one of them, he says:
`verily now i repent,'..."

the second group whose repentance is also not accepted are those
who pass away while they are infidels. the verse says about them:

"... nor for those who die while they are disbelievers. ..."

in fact, the verse indicates that those who have repented from their
sins and they had been safe and sound and had a good faith, but at the time
of death they were not faithful, their former repentance is futile, too.
at the end of the verse, it says about both groups:

"... those are they for whom we have prepared a painful torment."