diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-06-03 17:40:18 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:49:29 +0100 |
commit | b8f4ad50394e137113bde1c91f6160034882ca94 (patch) | |
tree | 1f9a78da8b34f471594a6fab516d3c53eaa66d4a /gcc/rust/hir/tree/rust-hir.h | |
parent | 8ae7e93d60cbfeda0f3930ea85bb3ab5809d623d (diff) | |
download | gcc-b8f4ad50394e137113bde1c91f6160034882ca94.zip gcc-b8f4ad50394e137113bde1c91f6160034882ca94.tar.gz gcc-b8f4ad50394e137113bde1c91f6160034882ca94.tar.bz2 |
gccrs: Improve macro repetition handling
gcc/rust/ChangeLog:
* expand/rust-macro-expand.cc
(MacroExpander::match_matcher): Remove append_fragment inside repetitions.
(MacroExpander::match_n_matches): Use sub_stack push/pop to handle repetitions.
(MatchedFragmentContainer::add_fragment): Add MatchedFragmentContainer accepting version.
* expand/rust-macro-expand.h
(MatchedFragmentContainer::add_fragment): Likewise.
(MatchedFragmentContainerRepetition::add_fragment): Likewise.
(SubstititionScope::append_fragment): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/macro56.rs: New test.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir.h')
0 files changed, 0 insertions, 0 deletions