@MrPunyapal I seem to recall trying Rector for this. Didn't manage to make it work and went to Parser. Surely is possible, I just had no experience working with Rector.
@JoshWComeau Thanks for the reply. I signed up to the newsletter, assuming you'll announce it there. Here I was more interested in the SVG part than the animation.