Re: [RFC][Discussion] Parser extension API
| From: | Sara Golemon | Date: | Thu, 19 Feb 2015 05:42:23 +0000 |
| Subject: | Re: [RFC][Discussion] Parser extension API | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83144@lists.php.net to get a copy of this message | ||
On Wed, Feb 18, 2015 at 11:22 AM, Dmitry Stogov <dmitry@zend.com> wrote:
> I think the AST API shouldn't use "public" properties.
> Using it, we will have to construct the whole tree of objects, duplicating
> information from AST.
> I would propose SimpleXML approach instead - construct object only for
> node(s) we currently access.
>
> So at first we will construct just single object referring to AST root.
> Then traversing it we will create and destroy objects for necessary nodes.
>
I'm not sure if you've seen my astkit extension, but it does this.
https://github.com/sgolemon/astkit
-Sara