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


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to