On Mon, Mar 6, 2017 at 3:40 PM, Sara Golemon <poll...@php.net> wrote:
> 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
>
Hrmmm, I seem to have not updated the README.md, but it is in there:
https://github.com/sgolemon/astkit/blob/master/astkit-node.c#L204-L214

-Sara

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

Reply via email to