aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-11-16 15:02:11 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-30 12:36:45 +0100
commit2fe5baf3dc1a563834b696b0aa63b68cffd27b56 (patch)
treeae53ef369150cb1da97a532ea8ea70010210d858
parentf1c7ce7e185444f498f8cb17a3c0f813a83fe3f3 (diff)
downloadgcc-2fe5baf3dc1a563834b696b0aa63b68cffd27b56.zip
gcc-2fe5baf3dc1a563834b696b0aa63b68cffd27b56.tar.gz
gcc-2fe5baf3dc1a563834b696b0aa63b68cffd27b56.tar.bz2
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>
-rw-r--r--gcc/rust/util/rust-keyword-values.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-keyword-values.h b/gcc/rust/util/rust-keyword-values.h
index 769b210..4a6f1df 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