The only diagram I've come up with is this one of a female gnat pupa. Click on it for a better, more readable version.
The digestive tract is a straight-through tube from mouth to anus. There's not a lot of surface area there to digest complicated foods, so I doubt the thing can do much to compound sugars like starches. Here's another article on gnats that I found. Their diet? Blood!
Eye gnats will regularly land on or around ones eye and nose; black flies or buffalo gnats will land anywhere they can find skin on which to suck blood. Essentially that is all the females want; blood. They will seek this from any mammal they can find and people will often times be their prime target.I'm not sure I buy this. The gnats I'm thinking of can't possibly have mouth parts big enough to penetrate skin and get to the blood. OK, so here's a more reasonable source that claims that gnats eat fungus. That's more believable.
Fungus gnats eat mainly fungus but can also eat root hairs and initiate root rot, which can kill plants. These pests are common in interior environments. They are small (2-3 mm) mosquito-like flies with one pair of wings. If they have infested potted plants in the home it is not uncommon to see them flying around your computer screen or even a can of pop. They are attracted to carbon dioxide; which people, cans of pop, and plants release.I'd love to delve into the biochemistry involved. Just what is it in the fungus that gnats digest and how do they do it? I imagine they're just licking the fungus. They don't seem to have mouth parts capable of biting.
I'll bet the Backyard Arthropod Project (which, by the way, is the reason the Internets Tubes were invented) has more to say on this subject.