aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-06-01 13:37:35 -0400
committerCohenArthur <arthur.cohen@embecosm.com>2023-06-22 08:38:34 +0000
commitd3b247e73368e2e50d71ce8c003e761469b1ec98 (patch)
treeed314de55ec22ff8eb055e578a2d0011bed8f013 /gcc/rust/resolve
parentc93eb308c5ad272059d690980813746895116c71 (diff)
downloadgcc-d3b247e73368e2e50d71ce8c003e761469b1ec98.zip
gcc-d3b247e73368e2e50d71ce8c003e761469b1ec98.tar.gz
gcc-d3b247e73368e2e50d71ce8c003e761469b1ec98.tar.bz2
Make MatchedFragmentContainer a tree-like structure
gcc/rust/ChangeLog: * expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Use pointers/smart pointers to refer to MatchedFragmentContainer instances. (MacroExpander::transcribe_rule): Likewise. (MatchedFragmentContainer::get_single_fragment): New implementation. (MatchedFragmentContainer::get_fragments): Likewise. (MatchedFragmentContainer::add_fragment): Likewise. (MatchedFragmentContainer::zero): Likewise. (MatchedFragmentContainer::metavar): Likewise. * expand/rust-macro-expand.h (class MatchedFragmentContainer): Make abstract. (class MatchedFragmentContainerMetaVar): New. (class MatchedFragmentContainerRepetition): New. (class SubstitutionScope): Use pointers/smart pointers to refer to MatchedFragmentContainer instances. (MacroExpander::transcribe_rule): Likewise. * expand/rust-macro-substitute-ctx.cc (SubstituteCtx::substitute_metavar): Likewise. (SubstituteCtx::check_repetition_amount): Likewise. (SubstituteCtx::substitute_repetition): Likewise. * expand/rust-macro-substitute-ctx.h (class SubstituteCtx): Likewise. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/resolve')
0 files changed, 0 insertions, 0 deletions