This is a pun on 'doughnut hole' which are the small circular doughnut bites, but 'whole' is used here in place of 'hole' because it sounds similar and because it implies that the speaker ate the last doughnut in one single bite
Her eyes were wide with longing as she peered into the Dunkin ' Donuts box and ate the last doughnut whole .