emit end on compile