Changeset 246c245 for src/AST/Init.hpp
- Timestamp:
- May 16, 2019, 6:51:18 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8ff178d, d66e7b7
- Parents:
- 9b4f329 (diff), 6f8e87d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Init.hpp
r9b4f329 r246c245 24 24 25 25 // Must be included in *all* AST classes; should be #undef'd at the end of the file 26 #define MUTATE_FRIEND template<typename node_t> friend automutate(const node_t * node);26 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node); 27 27 28 28 namespace ast { … … 58 58 const Init * accept( Visitor& v ) const override = 0; 59 59 private: 60 constInit * clone() const override = 0;60 Init * clone() const override = 0; 61 61 MUTATE_FRIEND 62 62 }; … … 122 122 }; 123 123 124 125 //=================================================================================================126 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency127 /// remove only if there is a better solution128 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with129 /// forward declarations130 inline void increment( const class Init * node, Node::ref_type ref ) { node->increment( ref ); }131 inline void decrement( const class Init * node, Node::ref_type ref ) { node->decrement( ref ); }132 inline void increment( const class SingleInit * node, Node::ref_type ref ) { node->increment( ref ); }133 inline void decrement( const class SingleInit * node, Node::ref_type ref ) { node->decrement( ref ); }134 inline void increment( const class ListInit * node, Node::ref_type ref ) { node->increment( ref ); }135 inline void decrement( const class ListInit * node, Node::ref_type ref ) { node->decrement( ref ); }136 inline void increment( const class ConstructorInit * node, Node::ref_type ref ) { node->increment( ref ); }137 inline void decrement( const class ConstructorInit * node, Node::ref_type ref ) { node->decrement( ref ); }138 124 } 139 125
Note: See TracChangeset
for help on using the changeset viewer.