]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Add clarity to the code
authorBenjamin Thos <benjamin.thos@epita.fr>
Thu, 31 Oct 2024 13:44:29 +0000 (13:44 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 17 Dec 2025 06:20:11 +0000 (07:20 +0100)
commitbbe7fd8f52c4e9c25e9b0609c027de4d2e833d8f
tree2083f92a8e89b3c3e14f85c5a78ed98242865db6
parentb4e3c262f982dd45665ae4b6b7b564d0db5fa958
gccrs: Add clarity to the code

Use an enum instead of bool to check if a comment is internal, use good
include and replace some variable name.

gcc/rust/ChangeLog:

* ast/rust-ast-collector.cc (TokenCollector::begin_internal_comment):
Change a boolean with an enum.
(TokenCollector::end_internal_comment): Likewise.
* ast/rust-ast-collector.h: Likewise + change include.
* ast/rust-ast-dump.cc (Dump::Dump): Change variable name.
* ast/rust-ast-dump.h: Likewise + replace vector with a set.
* rust-session-manager.cc (Session::enable_dump): Change variable
name.
(Session::handle_internal_blacklist): Change function name.
(Session::handle_excluded_node): Likewise.
(Session::dump_ast_pretty_internal): Change vector with a set.
* rust-session-manager.h (struct CompileOptions): Likewise + change
variable name.

Signed-off-by: Benjamin Thos <benjamin.thos@epita.fr>
gcc/rust/ast/rust-ast-collector.cc
gcc/rust/ast/rust-ast-collector.h
gcc/rust/ast/rust-ast-dump.cc
gcc/rust/ast/rust-ast-dump.h
gcc/rust/rust-session-manager.cc
gcc/rust/rust-session-manager.h