Re: Avoiding enum reserved keyword
| From: | Matthew Brown | Date: | Tue, 23 Feb 2021 21:51:13 +0000 |
| Subject: | Re: Avoiding enum reserved keyword | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-113242@lists.php.net to get a copy of this message | ||
On Tue, 23 Feb 2021 at 06:21, Nikita Popov <nikita.ppv@gmail.com> wrote:
> Another possibility would be to recognize T_ENUM in the lexer, but only if
> it is followed by whitespace and an identifier. This would possibly be
> friendlier for tooling using token_get_all(). It would not permit comments
> in between the tokens though.
>
I like this option. I can't think anyone would want to write "enum /**
some comment */ Foo {...}"