Re: [RFC][Discussion] Parser extension API

From: Date: Wed, 18 Feb 2015 06:22:54 +0000
Subject: Re: [RFC][Discussion] Parser extension API
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-83022@lists.php.net to get a copy of this message
Hi, On Tue, Feb 17, 2015 at 2:46 PM, Alexander Lisachenko < lisachenko.it@gmail.com> wrote: > Hello, internals! > > I want to introduce a RFC for providing a userland API for accessing an > Abstract Syntax Tree of the source code and to provide userland parser > hooks for source code modification: > https://wiki.php.net/rfc/parser-extension-api > > Thanks! > The first part, describing https://github.com/nikic/php-ast , looks fine. I see no problems including this extension into PHP-7.0 core distribution. May be even making it required (like ext/reflection). Nikita, what do you think? The second part looks very interesting, however it has some uncovered questions. - API for AST modification - AST validation (someone may insert "break" node in "parameter-list"). If you have enough experience, I would suggest you to try writing an external extension that would implement this idea. If you'll need some modification in PHP core (e.g adding callbacks), we may consider including them in PHP-7.0. Thanks. Dmitry.

« previous php.internals (#83022) next »