The biggest issue with filling the tank with gasoline is the lack of lubrication that the diesel oil provides the pump. Be prepared to replace the injection pump and maybe the injectors. Retail, that's around $1400, but that would be the worst case scenario. It is unlikely the engine itself was harmed.
Many years ago, when the winter fuel was not as predictable, I would add up to 10% gasoline to the diesel with no harm. If the tank were to have been completely empty, or 1/2 full when gasoline filled, could make a big difference what occurred in the injection pump.
The question is, does it still run? Does the injection pump clatter? The first thing to go is usually the distributor shaft in the pump head. Even that is separately replaceable. $400 buys a good head. Mileage, body condition, engine condition, interior condition... Is the rest of the car worth the time and trouble?
If I were testing that car, I would 1. Drain the injection pump by removing the plug in the back of pump head. All the fuel won't come out, but maybe 1/2 will. Reinstall center nut. 2. Make a remote fueling setup, remove the 'IN' line on the fuel pump, Set up a small fuel tank to fill the injection pump. Vacuum the fuel from the system until you have at least 1 qt of diesel moved into the pump. With all the lines tight, use the return line removed from the #4 injector and a MiteyVac (me, I have an electric vacuum pump...) and pull the fuel into the pump. 3. Once the pump is primed, purge the air/ gasoline. from the injector lines. 4. Attempt to start the vehicle. A NO START is an expensive pig in a poke. Of course, if all this is done in front of the owner, and it does start, your purchase price goes UP!
As for me, I would offer junkyard prices. That's what a non-running car is worth. $400-$500, maybe. Or walk away.
If it doesn't pan out, I part out things like that. The engine/ transmission removed from the vehicle is worth more than the vehicle itself.