On Mon, Mar 6, 2017 at 3:37 PM, Adam Baratz <adambar...@php.net> wrote:
> I'm exploring how to automate some basic kinds of refactor operations. One
> approach I'm considering:
>
>    - Generate an AST
>    - Rearrange it as needed
>    - Turn it back into userland code
>
> Is this something anyone's explored?
>
The engine's internals actually have an ast export method which does
this alread (it's used by the assert message generator).   astkit
makes use of this in an extension to do much of what you describe:
https://github.com/sgolemon/astkit

-Sara

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to