Does Scope-Resolution Operator Always Follow 'parent'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
南無妙法蓮華經

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux