Re: Double-Colon Always Follows the 'parent' Keyword?

From: Date: Mon, 11 Mar 2013 14:39:32 +0000
Subject: Re: Double-Colon Always Follows the 'parent' Keyword?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-66588@lists.php.net to get a copy of this message
Hi Den 11/03/2013 kl. 13.55 skrev Eric James Michael Ritz <lobbyjones@gmail.com>: > > Thanks for the idea. Checking for brackets would work but not > whitespace since PHP allows programmers to write code such as > > echo $this-> parent; // Same as $this-> Technically "parent" and "self" is not keywords, they are implemented as T_STRING. These are only used as keywords when the next non whitespace token is a double colon, like: self::$property->... So I would continue reading until the next token and decide from there if its used in a "keyword-context" or not to decide its syntax highlight color. -K

« previous php.internals (#66588) next »