engine quitting on 1998 Chevrolet Lumina

while driving, the car quits running. Place in "N" and it restarts. The engine revs up and down prior to quitting. is this the mass air flow or the ignition switch?

Asked by for the 1998 Chevrolet Lumina
It may be the MAF Sensor, but unlikely that it's the ignition switch. The ideal next step is to check the diagnostic trouble codes, has that been done? And I would also check the fuel pressure.