]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: ast: Change visibility in token type
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 4 Apr 2023 14:19:51 +0000 (16:19 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:28:44 +0000 (18:28 +0100)
Change the token type from a custom identifier to the reserved token
keyword "in".

gcc/rust/ChangeLog:

* ast/rust-ast-tokenstream.cc (TokenStream::visit): Change token
type.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-tokenstream.cc

index 0db1e2ccfed7d15122b9380e2951d3a619f68dbc..a380fec86960dd01e67cd7aefad3b6ab1e32c86a 100644 (file)
@@ -248,7 +248,7 @@ TokenStream::visit (Visibility &vis)
     case Visibility::PUB_IN_PATH:
       tokens.push_back (Rust::Token::make (PUB, vis.get_locus ()));
       tokens.push_back (Rust::Token::make (LEFT_PAREN, Location ()));
-      tokens.push_back (Rust::Token::make_identifier (Location (), "in"));
+      tokens.push_back (Rust::Token::make (IN, Location ()));
       visit (vis.get_path ());
       tokens.push_back (Rust::Token::make (RIGHT_PAREN, Location ()));
       break;