I would not panic just yet. There are many things that could cause a bit of swelling. Maybe he bumped it, maybe he rubbed it, it's possible he has an infection, and it's also possible it is nothing.
Wait and see what the vet says, and get pictures if you can. A word of caution, do NOT let the vet poke or prod at the eye or attempt to remove an eye cap. Someone here had a vet blind his snake because of fiddling with it's eye without knowing what they were doing.
Gale