Changeset 2377ca2 for src/AST/Pass.impl.hpp
- Timestamp:
- Mar 28, 2022, 1:48:13 PM (2 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 18f7858
- Parents:
- 8e819a9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.impl.hpp
r8e819a9 r2377ca2 399 399 400 400 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> 402 402 void ast::Pass< core_t >::maybe_accept( 403 403 const node_t * & parent, 404 child_t parent_t::*child404 field_t super_t::*field 405 405 ) { 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); 410 410 411 411 static_assert( !std::is_same<const ast::Node * &, decltype(old_val)>::value, "ERROR"); … … 417 417 if( new_val.differs ) { 418 418 auto new_parent = __pass::mutate<core_t>(parent); 419 new_val.apply(new_parent, child);419 new_val.apply(new_parent, field); 420 420 parent = new_parent; 421 421 } … … 423 423 424 424 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> 426 426 void ast::Pass< core_t >::maybe_accept_as_compound( 427 427 const node_t * & parent, 428 child_t parent_t::*child428 field_t super_t::*child 429 429 ) { 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" ); 431 431 432 432 if(__pass::skip(parent->*child)) return;
Note: See TracChangeset
for help on using the changeset viewer.