diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-11-16 16:20:49 +0100 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2023-11-21 12:45:32 +0000 |
commit | 34479e5427159b29aeb7685a5de58080e7899e8c (patch) | |
tree | 7472ee66e21e146488be535ab018aecb02a9927e /gcc/rust/parse/rust-parse.h | |
parent | 897532ac166e528f0d9246b2e7744b2e5b859368 (diff) | |
download | gcc-34479e5427159b29aeb7685a5de58080e7899e8c.zip gcc-34479e5427159b29aeb7685a5de58080e7899e8c.tar.gz gcc-34479e5427159b29aeb7685a5de58080e7899e8c.tar.bz2 |
Introduce a proper keyword list
The old "keyword" list was used for the lexer, and could therefore not
be used with keyword spanning over multiple tokens as those tokens should
remain lexed as is. Hence the introduction of a new list macro for
keyword exclusive tasks. This also means we can no longer match a token
id for each keyword. The token id map has been renamed to keep it's
properties.
gcc/rust/ChangeLog:
* lex/rust-lex.cc (Lexer::classify_keyword): Update keyword map name.
* lex/rust-token.h (enum PrimitiveCoreType): Remove some deprecated
comments.
* util/rust-keyword-values.cc (get_keywords): Update the keyword map
name.
(RS_TOKEN): Define as empty
(RS_TOKEN_KEYWORD_2015): Add the emission value.
(RS_TOKEN_KEYWORD_2018): Likewise.
* util/rust-keyword-values.h (RS_KEYWORD_LIST): Introduce the keyword
list.
(RS_TOKEN_KEYWORD_2018): Define multiple new keywords.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
0 files changed, 0 insertions, 0 deletions