From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7905) id 5BA083858296; Tue, 30 Jan 2024 11:59:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BA083858296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706615955; bh=fRGofPomdd4T1D2hTcWUISwSuwvgJii6NogaREoIW/g=; h=From:To:Subject:Date:From; b=ELs9k9PGc9IRmpaOOzMy/GNOXVzJ3MB5UlaOGXCK8nuAokQK9bBqfujxVzUJuJGDr zGJqUiqIOLun6M8Cimw6m8tgm1Q4zZ14DTa7cYVgEbj8y447zzytw+0zavc4vrkZcd HxkJRjOSCPbbpRr5lUkVEa300mfG7AFTLxY7Om30= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Arthur Cohen To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8553] gccrs: Add a list of weak keyword X-Act-Checkin: gcc X-Git-Author: Pierre-Emmanuel Patry X-Git-Refname: refs/heads/trunk X-Git-Oldrev: f1c7ce7e185444f498f8cb17a3c0f813a83fe3f3 X-Git-Newrev: 2fe5baf3dc1a563834b696b0aa63b68cffd27b56 Message-Id: <20240130115915.5BA083858296@sourceware.org> Date: Tue, 30 Jan 2024 11:59:15 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2fe5baf3dc1a563834b696b0aa63b68cffd27b56 commit r14-8553-g2fe5baf3dc1a563834b696b0aa63b68cffd27b56 Author: Pierre-Emmanuel Patry Date: Thu Nov 16 15:02:11 2023 +0100 gccrs: Add a list of weak keyword Retrieving a weak keyword value is done using raw values. Introducing a list of weak keywords means this could change. gcc/rust/ChangeLog: * util/rust-keyword-values.h (class WeakKeywords): Add new class with weak keyword constexpr. Signed-off-by: Pierre-Emmanuel Patry Diff: --- gcc/rust/util/rust-keyword-values.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gcc/rust/util/rust-keyword-values.h b/gcc/rust/util/rust-keyword-values.h index 769b2100c41f..4a6f1df525d0 100644 --- a/gcc/rust/util/rust-keyword-values.h +++ b/gcc/rust/util/rust-keyword-values.h @@ -41,6 +41,20 @@ public: #undef RS_TOKEN }; +class WeakKeywords +{ +public: + static constexpr auto &AUTO = "auto"; + static constexpr auto &BUILTIN = "builtin"; + static constexpr auto &CATCH = "catch"; + static constexpr auto &DEFAULT = "default"; + static constexpr auto &GEN = "gen"; + static constexpr auto &MACRO_RULES = "macro_rules"; + static constexpr auto &RAW = "raw"; + static constexpr auto &UNION = "union"; + static constexpr auto &YEET = "yeet"; +}; + } // namespace Values } // namespace Rust