Re: Double-Colon Always Follows the 'parent' Keyword?
Hi
Den 11/03/2013 kl. 13.55 skrev Eric James Michael Ritz <[email protected]>:
>
> 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
Thread (5 messages)