move enum parsing in front of type parsing