diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-04-18 14:38:22 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:37:14 +0100 |
commit | ebbb3d2d5f74f4c00132df085fe7829abba4fe1c (patch) | |
tree | 881637a5461f7759089de28f91469149022430b3 /gcc/rust/rust-gcc.cc | |
parent | c532c201b360fcddc84f687e795248c132ba4787 (diff) | |
download | gcc-ebbb3d2d5f74f4c00132df085fe7829abba4fe1c.zip gcc-ebbb3d2d5f74f4c00132df085fe7829abba4fe1c.tar.gz gcc-ebbb3d2d5f74f4c00132df085fe7829abba4fe1c.tar.bz2 |
gccrs: ast: Add take_items() and set_items() methods for Item containers
Both the AST::Crate and AST::Module class are std::unique_ptr<AST::Item>
containers, and may require spurious insertions in these containers,
for example when expanding a procedural macro, or in our case, escaping
macros through the #[macro_use] attribute. These functions allow you
to replace *all* of the items contained in such a container.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add take_items() and set_items() method to Crate.
* ast/rust-item.h: Add take_items() and set_items() method to Module.
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
0 files changed, 0 insertions, 0 deletions