Changeset 87701b6 for src/AST/Init.hpp
- Timestamp:
- May 16, 2019, 4:13:19 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:
- e61207e7
- Parents:
- 1fb7bfd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Init.hpp
r1fb7bfd r87701b6 54 54 const Init * accept( Visitor& v ) const override = 0; 55 55 private: 56 constInit * clone() const override = 0;56 Init * clone() const override = 0; 57 57 }; 58 58 … … 72 72 /// Must be copied in ALL derived classes 73 73 template<typename node_t> 74 friend automutate(const node_t * node);74 friend node_t * mutate(const node_t * node); 75 75 }; 76 76 … … 100 100 /// Must be copied in ALL derived classes 101 101 template<typename node_t> 102 friend automutate(const node_t * node);102 friend node_t * mutate(const node_t * node); 103 103 }; 104 104 … … 123 123 /// Must be copied in ALL derived classes 124 124 template<typename node_t> 125 friend automutate(const node_t * node);125 friend node_t * mutate(const node_t * node); 126 126 }; 127 127 128 129 //=================================================================================================130 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency131 /// remove only if there is a better solution132 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with133 /// forward declarations134 inline void increment( const class Init * node, Node::ref_type ref ) { node->increment( ref ); }135 inline void decrement( const class Init * node, Node::ref_type ref ) { node->decrement( ref ); }136 inline void increment( const class SingleInit * node, Node::ref_type ref ) { node->increment( ref ); }137 inline void decrement( const class SingleInit * node, Node::ref_type ref ) { node->decrement( ref ); }138 inline void increment( const class ListInit * node, Node::ref_type ref ) { node->increment( ref ); }139 inline void decrement( const class ListInit * node, Node::ref_type ref ) { node->decrement( ref ); }140 inline void increment( const class ConstructorInit * node, Node::ref_type ref ) { node->increment( ref ); }141 inline void decrement( const class ConstructorInit * node, Node::ref_type ref ) { node->decrement( ref ); }142 128 } 143 129
Note: See TracChangeset
for help on using the changeset viewer.