Simplified the parseTag function

A switch statement would be far more appropriate here.
That case is very unlikely given the typehint.