]> gcc.gnu.org Git - gcc.git/commit
Change keyword set to a map
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 8 Nov 2023 13:54:51 +0000 (14:54 +0100)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Tue, 14 Nov 2023 18:27:16 +0000 (18:27 +0000)
commit8ec6996a74cc33a2034cfb94d0b8acd580eca87c
treea2cef8a28042753e39f0dfdc7bf6e1da7a8ab4f5
parentfdb87a41adbf0072a08182a0da48c33d491abf3c
Change keyword set to a map

Some part of the code requires the token id behind a given keyword, a map
keep the "set" aspect whilst providing this additional feature.

gcc/rust/ChangeLog:

* lex/rust-lex.cc (RS_TOKEN): Remove local map.
(RS_TOKEN_KEYWORD): Likewise.
(Lexer::classify_keyword): Change call to utils.
* util/rust-keyword-values.cc (get_keywords): Add init function.
(RS_TOKEN_KEYWORD): Call to X macro.
* util/rust-keyword-values.h: Change from set to a map.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/lex/rust-lex.cc
gcc/rust/util/rust-keyword-values.cc
gcc/rust/util/rust-keyword-values.h
This page took 0.062248 seconds and 5 git commands to generate.