]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Rework code to call one function when add comment
authorBenjamin Thos <benjamin.thos@epita.fr>
Thu, 12 Dec 2024 13:51:53 +0000 (14:51 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 17 Dec 2025 06:20:11 +0000 (07:20 +0100)
commitd3187907716589a4d5f679b8a01446d54ee8a98f
tree11af01e1723b2617521c4f3088cf122ce9108b67
parentbbe7fd8f52c4e9c25e9b0609c027de4d2e833d8f
gccrs: Rework code to call one function when add comment

When we want to add an internal comment we know call one function that
wrap the code instead of calling two function, one at the beginning one
at the end.

gcc/rust/ChangeLog:

* ast/rust-ast-collector.cc (TokenCollector::internal_comment):
Wrapper function to add both  comment.
(TokenCollector::visit): call of the wrapper function.
(TokenCollector::visit_closure_common): Same.
(TokenCollector::visit_loop_common): Same.
* ast/rust-ast-collector.h: Prototype of the wrapper function

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