Changeset 6054b18 for src/SynTree/DeclReplacer.h
- Timestamp:
- May 29, 2019, 9:09:30 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 466fa01
- Parents:
- c786e1d (diff), d88f8b3b (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/SynTree/DeclReplacer.h
rc786e1d r6054b18 26 26 typedef std::map< DeclarationWithType *, DeclarationWithType * > DeclMap; 27 27 typedef std::map< TypeDecl *, TypeDecl * > TypeMap; 28 typedef std::map< DeclarationWithType *, Expression * > ExprMap; 28 29 29 30 void replace( BaseSyntaxNode * node, const DeclMap & declMap, bool debug = false ); 30 31 void replace( BaseSyntaxNode * node, const TypeMap & typeMap, bool debug = false ); 31 32 void replace( BaseSyntaxNode * node, const DeclMap & declMap, const TypeMap & typeMap, bool debug = false ); 33 34 void replace( BaseSyntaxNode *& node, const ExprMap & exprMap, bool debug = false); 35 template<typename T> 36 void replace( T *& node, const ExprMap & exprMap, bool debug = false ) { 37 if ( ! node ) return; 38 BaseSyntaxNode * arg = node; 39 replace( arg, exprMap, debug ); 40 node = dynamic_cast<T *>( arg ); 41 assertf( node, "DeclReplacer fundamentally changed the type of its argument." ); 42 } 32 43 } 33 44
Note: See TracChangeset
for help on using the changeset viewer.