Re: Re: [RFC] Normalize token_get_all() output (with flag)
| From: | Sara Golemon | Date: | Mon, 18 Jan 2016 01:41:06 +0000 |
| Subject: | Re: Re: [RFC] Normalize token_get_all() output (with flag) | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-90685@lists.php.net to get a copy of this message | ||
On Sun, Jan 17, 2016 at 3:34 AM, Stig Bakken <stig.bakken@gmail.com> wrote:
> On Jan 17, 2016 05:23, "Sara Golemon" <pollita@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...
-Sara