Hey Kornel,
First of all I want to tell you that the idea is really great!
But I'm wondering if it wasn't better to adopt something like
https://github.com/nikic/PHP-Parser for this.
I don't think it's PHPTal's job to optimize the AST, and since there's
already an AST lib out there that has gain
A while ago I thought about creating PHP *optimizer*. The goal is to make
PHPTAL-generated code as efficient as hand-written code, e.g. merge
adjacent strings and echo statements (implemented) and avoid pushState()
calls or maintenance of repeat/xx/key variables when those features are
no