]> gcc.gnu.org Git - gcc.git/commit
gccrs: Introduce a proper keyword list
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 16 Nov 2023 15:20:49 +0000 (16:20 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:45 +0000 (12:36 +0100)
commit2c843a047dd3c596b4daabe247e52e1d6475e4d6
tree80c1c2e8003d2caa7bcbad706e10bdd84c165e1c
parent28652f21e5560123c658d3e11d638957cb344641
gccrs: 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>
gcc/rust/lex/rust-lex.cc
gcc/rust/lex/rust-token.h
gcc/rust/util/rust-keyword-values.cc
gcc/rust/util/rust-keyword-values.h
This page took 0.063118 seconds and 5 git commands to generate.