2015-02-17 15:06 GMT+03:00 Leigh <lei...@gmail.com>:

> Does the AST provided by the internal parser provide all of the
> information required to be able to turn it back into source code?
>
> Yes, this should be possible, via zend_emit_op*() and zend_compile*()


2015-02-17 15:06 GMT+03:00 Leigh <lei...@gmail.com>:

> Re: Extending the parser from PHP userland.
>
> This I don't like so much.
>
> To be honest I hoped this would be an API to extend the parser from
> PHP extensions :) I think letting userland fiddle directly with the
> compilation process is just asking for trouble.
>

Expected reaction ) However, it would be nice to have such API on userland
too (on engine level this can be a hook too). This will give an instrument
for building custom things on user side, but will keep PHP engine clear
from a lot of stuff, which can be implemented by users. Nice example is
Design-By-Contract validation, it can be easily done via parser hooks.

Reply via email to