public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8553] gccrs: Add a list of weak keyword
@ 2024-01-30 11:59 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 11:59 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2fe5baf3dc1a563834b696b0aa63b68cffd27b56
commit r14-8553-g2fe5baf3dc1a563834b696b0aa63b68cffd27b56
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
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 <pierre-emmanuel.patry@embecosm.com>
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 11:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 11:59 [gcc r14-8553] gccrs: Add a list of weak keyword Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).