Re: Avoiding enum reserved keyword

From: Date: Sun, 07 Mar 2021 00:32:46 +0000
Subject: Re: Avoiding enum reserved keyword
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-113414@lists.php.net to get a copy of this message
Hi Nikita

> 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.

Thanks for the suggestion. This approach seems to work well.

https://github.com/php/php-src/pull/6489/commits/4da3f3cc38b2b99004f3dcb67fd850a4f9608006

Hopefully this will make migrating to PHP 8.1 a little easier.

Ilija


Thread (4 messages)

« previous php.internals (#113414) next »