On Wed, Feb 18, 2015 at 10:34 PM, Alexander Lisachenko < lisachenko...@gmail.com> wrote:
> > 2015-02-18 22:22 GMT+03:00 Dmitry Stogov <dmi...@zend.com>: > >> 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. > > > What about Generators? They can be used nicely for handling AST data. And > each node can be constructed as needed during the traversal. Probably this > way is better than ArrayAccess > No. Generators allows only sequential access, while ArrayAccess - random. Thanks. Dmitry.