Does Scope-Resolution Operator Always Follow 'parent'?
| From: | Eric James Michael Ritz | Date: | Mon, 11 Mar 2013 03:21:31 +0000 |
| Subject: | Does Scope-Resolution Operator Always Follow 'parent'? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-320454@lists.php.net to get a copy of this message | ||
Hello everyone,
I have a question about the
parent keyword: is there any valid
situation where it can appear without the :: operator following?
I am asking to fix a bug in php-mode[1] for GNU Emacs. Consider the
following code:
echo $parent;
echo parent::$foo;
echo $this->parent;
The mode incorrectly highlights parent in the final line as if it
were the keyword, but PHP itself treats it as a member of an object.
My idea for fixing this incorrect syntax highlighting is to only treat
parent as a keyword if the :: operator follows it. But I want to
make sure that this assumption is correct.
Thanks in advanced for any help!
[1]: https://github.com/ejmr/php-mode
--
ejmr
南無妙法蓮華經