Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_language_scanner.l

From: Date: Thu, 28 Nov 2002 21:54:09 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_language_scanner.l
References: 1 2 3 4 5  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-668@lists.php.net to get a copy of this message
At 19:05 28.11.2002, Sterling Hughes wrote:
At 18:13 28.11.2002, Jon Parise wrote:
On Thu, Nov 28, 2002 at 06:08:19PM +0100, Derick Rethans wrote:
It would be better to return T_PUBLIC instead of T_VAR and handle T_PUBLIC in the parser since we want to have public,protected and private member functions. See patch is below:
Why? It's exactly the same. Introducing new tokens which don't add anything doesn't look right to me.
I agree with Derick here. As I understood things, "public" is basically just a convenience alias for "var". -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)
The point is that it seems we will have public, protected and private functionns. Using T_VAR as public token for methods is a little bit dirty.
    I agree, however, I think we should rename the T_VAR to T_PUBLIC,
    and just keep 'var' as an alias.   Attached is a patch (i also have
    one for tokenizer, so, it builds together, but I left it off for brevity)
    that goes ahead and renames this.
    -Sterling
With your patch we will allow var function() {} marcus

« previous php.zend-engine.cvs (#668) next »