Skip to content

Commit

Permalink
Add a list of weak keyword
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
P-E-P committed Nov 16, 2023
1 parent 5377030 commit c871375
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gcc/rust/util/rust-keyword-values.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ class Keywords
#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

Expand Down

0 comments on commit c871375

Please sign in to comment.