Re: RFC: Making T_FUNCTION optional in method declarations
| From: | Martin Wernstahl | Date: | Sat, 27 Nov 2010 23:13:55 +0000 |
| Subject: | Re: RFC: Making T_FUNCTION optional in method declarations | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50645@lists.php.net to get a copy of this message | ||
@Johannes:
The T_STRING token never contains "$", AFAIK all identifiers starting with
"$" are instead classed as T_VARIABLE tokens.
So you'd search for the visibility modifier (+ static, etc.) + T_STRING for
methods, and visibility (+ static) + T_VARIABLE for properties.
Martin
2010/11/27 Johannes Schlüter <johannes@schlueters.de>
> On Sat, 2010-11-27 at 23:14 +0100, Johannes Schlüter wrote:
>
> > [ T_PUBLIC | T_PROTECTED | T_PRIVATE | T_STATIC | T_ABSTRACT ] { & }
> T_STRING "(" param_list ")" { "{" statement_ist "}" }
>
> I forgot T_FINAL there.
>
> johannes
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>