diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-05-08 20:58:59 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:37:18 +0100 |
commit | 2aeff9ce08576ad33a29ed6fc6a87e9516b0641f (patch) | |
tree | 13baedb8833902eb1e320327ceef66f9d9844ec6 /gcc/rust/hir/tree | |
parent | 8769b4900fd0a91cc5021a4f86679820b17d4c41 (diff) | |
download | gcc-2aeff9ce08576ad33a29ed6fc6a87e9516b0641f.zip gcc-2aeff9ce08576ad33a29ed6fc6a87e9516b0641f.tar.gz gcc-2aeff9ce08576ad33a29ed6fc6a87e9516b0641f.tar.bz2 |
gccrs: Handle keywords in macro fragments
gcc/rust/ChangeLog:
* lex/rust-token.cc
(token_id_is_keyword): New.
(token_id_keyword_string): New.
* lex/rust-token.h
(token_id_is_keyword): New.
(token_id_keyword_string): New.
* expand/rust-macro-expand.cc
(MacroExpander::match_fragment): Match keywords for ident fragment.
* parse/rust-parse-impl.h
(Parser::parse_identifier_or_keyword_token): Add.
* parse/rust-parse.h
(Parser::parse_identifier_or_keyword_token): Add.
gcc/testsuite/ChangeLog:
* rust/compile/macro-issue2192.rs: New test.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/hir/tree')
0 files changed, 0 insertions, 0 deletions