On Mon, Jan 18, 2016 at 2:41 AM, Sara Golemon <poll...@php.net> wrote:
> On Sun, Jan 17, 2016 at 3:34 AM, Stig Bakken <stig.bak...@gmail.com> > wrote: > > On Jan 17, 2016 05:23, "Sara Golemon" <poll...@php.net> wrote: > >> > >> Okay, i've got a starting point up at > >> https://github.com/phplang/php-token . It's basically just > >> token_get_all() and token_name() as they currently stand (I didn't > >> even bother overriding the behavior in token_name() yet). I did > >> change some of the codeflow layout a bit (and add support for scanning > >> files in the process), but that's it. > > > > I really like this, funny really that it took until now for someone to > get > > enough of the old interface :) > > > > But rather than overloading the existing token_get_all() function with > flags > > that change its behavior, what about just adding a new function, say > > token_get_all_assoc(), and give it a TOKEN_LINENUMS flag if you want to > make > > line numbers optional for performance? > > > Um.... this extension *is* a new interface... Not really, it's a new implementation. The old extension is the interface. But I'll stop being pedantic ;-) - Stig