Respuesta :

The infinitive here is 'to leave', and it is used as an 'adverb', meaning 'with the intention to leave', since it modifies a verb, it has to be an adverb.