Ignore:
Timestamp:
Mar 28, 2022, 1:48:13 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
18f7858
Parents:
8e819a9
Message:

Updated some names on mutate functions to me more consistent with some 'better' names we came up with more recently.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    r8e819a9 r2377ca2  
    399399
    400400        template< typename core_t >
    401         template<typename node_t, typename parent_t, typename child_t>
     401        template<typename node_t, typename super_t, typename field_t>
    402402        void ast::Pass< core_t >::maybe_accept(
    403403                const node_t * & parent,
    404                 child_t parent_t::*child
     404                field_t super_t::*field
    405405        ) {
    406                 static_assert( std::is_base_of<parent_t, node_t>::value, "Error deducing member object" );
    407 
    408                 if(__pass::skip(parent->*child)) return;
    409                 const auto & old_val = __pass::get(parent->*child, 0);
     406                static_assert( std::is_base_of<super_t, node_t>::value, "Error deducing member object" );
     407
     408                if(__pass::skip(parent->*field)) return;
     409                const auto & old_val = __pass::get(parent->*field, 0);
    410410
    411411                static_assert( !std::is_same<const ast::Node * &, decltype(old_val)>::value, "ERROR");
     
    417417                if( new_val.differs ) {
    418418                        auto new_parent = __pass::mutate<core_t>(parent);
    419                         new_val.apply(new_parent, child);
     419                        new_val.apply(new_parent, field);
    420420                        parent = new_parent;
    421421                }
     
    423423
    424424        template< typename core_t >
    425         template<typename node_t, typename parent_t, typename child_t>
     425        template<typename node_t, typename super_t, typename field_t>
    426426        void ast::Pass< core_t >::maybe_accept_as_compound(
    427427                const node_t * & parent,
    428                 child_t parent_t::*child
     428                field_t super_t::*child
    429429        ) {
    430                 static_assert( std::is_base_of<parent_t, node_t>::value, "Error deducing member object" );
     430                static_assert( std::is_base_of<super_t, node_t>::value, "Error deducing member object" );
    431431
    432432                if(__pass::skip(parent->*child)) return;
Note: See TracChangeset for help on using the changeset viewer.