Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90680 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88518 invoked from network); 17 Jan 2016 11:34:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jan 2016 11:34:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=stig.bakken@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stig.bakken@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: stig.bakken@gmail.com X-Host-Fingerprint: 209.85.215.54 mail-lf0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:35106] helo=mail-lf0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/10-20254-64C7B965 for ; Sun, 17 Jan 2016 06:34:31 -0500 Received: by mail-lf0-f54.google.com with SMTP id c192so305116421lfe.2 for ; Sun, 17 Jan 2016 03:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZAz0BisbvZKT3SzDFFhnPZ/Q/TSB3tLI1untz6OmMzs=; b=uOMzA+hiOz++c36kRvXa1bZIjZWRcz9+JN+amx+MTomoc65F9fTcSlPwYb6pH8oJxi 8BxUM4o9GFmEZL0eaQQ1R16uf9VbX+va7RDdcpFRKzjs/s88ztyUtAXj/aDnLxtfnkzo CS2xkRZNgzE7kY+eYcTYzdbxSn7P3Q4QlVpy1pLBOtRod2cNOZMy6i80cm3DDi1uAbNP F4y9YzG+iWoPNfqxkEk6kyV6fiBlHpk9IgeA/op8fHDUe1daijGKe3d683oczMLTRXAT Mobk84kMh1QMjJWcnJYEgXYzIWNT3AicR3QVYmgZqB0APB+Edkrz3/Pj1Mm1NEeEPEQL Rn5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ZAz0BisbvZKT3SzDFFhnPZ/Q/TSB3tLI1untz6OmMzs=; b=Go0oVOa07NjspZesOMzxDQBsq7g4aIyGkIel5X5eJuk6lTcB7hbywr4gTt9b+abfo3 uJUvAsWqtOIRSAzDXbvrfY85Qx1AefpvYMr6Gw9Z8WT3HuTRD6AXXWqY8iOlDHzVZYVr JMOA8VSFnlEKMVBv3BflMut66vGB3eCiyJrk/WP5pJoBfv86MiKMexsEEL9qpOedeEwU UzrWn3hYlukf3uvtmO1UKkqdFSlAIzMGEmuzyA2mssbRO9dWSBnxIlAtRe04S4M+iYD8 YoXX8YxMdYmQ76ngZav7euw/48l14EIrM/1jdZG4pIOSFV4qmezIZdJuGKWJSQuC/Fv/ hfmQ== X-Gm-Message-State: ALoCoQnwH6XrgeFC30YbEZ2CFJyME83DMKbN9FXx7suum9QW1nqdvEycw5WxRsFFWkvQci9tKpVRyXdPgWgJ8oYBxDHStJ1rQA== MIME-Version: 1.0 X-Received: by 10.25.77.79 with SMTP id a76mr6776694lfb.1.1453030467131; Sun, 17 Jan 2016 03:34:27 -0800 (PST) Received: by 10.25.89.15 with HTTP; Sun, 17 Jan 2016 03:34:27 -0800 (PST) Received: by 10.25.89.15 with HTTP; Sun, 17 Jan 2016 03:34:27 -0800 (PST) In-Reply-To: References: <77.F6.12097.81D2C865@pb1.pair.com> <3F.20.05337.CEE68965@pb1.pair.com> Date: Sun, 17 Jan 2016 12:34:27 +0100 Message-ID: To: Sara Golemon Cc: internals@lists.php.net, Andrea Faulds Content-Type: multipart/alternative; boundary=001a113ff650d75fb205298604a7 Subject: Re: [PHP-DEV] Re: [RFC] Normalize token_get_all() output (with flag) From: stig.bakken@gmail.com (Stig Bakken) --001a113ff650d75fb205298604a7 Content-Type: text/plain; charset=UTF-8 On Jan 17, 2016 05:23, "Sara Golemon" 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? At least in my experience, code becomes more readable with new method/function names than with a bunch of optional flags in cases like this. - Stig --001a113ff650d75fb205298604a7--