Simplified the parseTag function

A switch statement would be far more appropriate here.
Looks like the `)` is missing here.