Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113414 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44662 invoked from network); 7 Mar 2021 00:41:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Mar 2021 00:41:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 119A41804C3 for ; Sat, 6 Mar 2021 16:33:07 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 6 Mar 2021 16:33:03 -0800 (PST) Received: by mail-yb1-f175.google.com with SMTP id d9so6262325ybq.1 for ; Sat, 06 Mar 2021 16:33:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=f6P6ffiJH3sDdhsBBCDKnGyQXFzgl8XuQpWhMrtavRU=; b=Fdz4R5GTtMWGC280vH/zwlBkN9asuMlqE2ogyuWWUnwGgC5d/yj+QFJ+lfqbKm7/pf 56QGGaoba1LjUf9LgTLrdnRtM/Cy4Sf1z6JmAcGYsQqOPknskH0AEuzbKCDWCmqqk5wZ R842VA3r5BZ+NTnUTczKg8tgHw8q7lfZjJckSNtgUinpQlJeC+PSeIj8cYtjhrDUWtu6 +KncvGnFXl5YoovGeicF6l5tpIT2+QVNFik9PRf3kiARRTdiF1WmdCpIUTMseCCq+vp0 Kvx4H7hoGLEdjsQa7VL35JbLhG2VphcCAueri9I/3+nfv77UVMIYTtQhgnjRShu8tIC2 zvbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=f6P6ffiJH3sDdhsBBCDKnGyQXFzgl8XuQpWhMrtavRU=; b=Rhp41eyyNSfN7L1vVYwzRSHuRFMU2DLRpUw/1FV/5meJaGZ5hxK0ozMI0WCJHgSmD1 YhJyPtiph4RBvmfXeDOXrS5ljVr6ShQI3Z6yhkF66Nwqwc4leORnC7mKlG5SJ2RhbVEF aGZiMrP8w184nO2SPD0Mz9haYGDcMiKxZobi1zApMT+LTcQUCrup7UPwFU+jsY5b0Q1X PjLVbGPehnJBAztfiu4Q7flIy/JmbZ0XFiI/HYX2Jk1dYsltVTWcW8/voVR/LCI4QXT2 gf/zv8eMO++Yny30tVMvQznGnGYf+yQat/n3Tnc0RH6Nm3JlIIjS4MXWue4WlRy3EuP0 i/+w== X-Gm-Message-State: AOAM533ZdAaBsxGOlaHAb+4uM6tZxuSqDNwkhcRI1kUJRmva7ht9XSRS 6i27QuHWYMvwz8sH9tfV80SJ2iIHrQPnx9fIKqkYayGwUq57ag== X-Google-Smtp-Source: ABdhPJyyKuICR1Nu+nwPHbDhH2IMQ8UM3ztQwmeZ6xZyXJD2wazefmGHBzwXZIQ2BgMemNYNUMhAKXoBMQi+Wn8nBWQ= X-Received: by 2002:a25:3802:: with SMTP id f2mr23302916yba.48.1615077178643; Sat, 06 Mar 2021 16:32:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 7 Mar 2021 01:32:46 +0100 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Avoiding enum reserved keyword From: tovilo.ilija@gmail.com (Ilija Tovilo) 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