Changes in src/SynTree/DeclReplacer.h [7862059:0ce063b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/DeclReplacer.h
r7862059 r0ce063b 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 void replace( BaseSyntaxNode * node, const DeclMap & declMap, bool debug = false ); 30 void replace( BaseSyntaxNode * node, const TypeMap & typeMap, bool debug = false ); 31 void replace( BaseSyntaxNode * node, const DeclMap & declMap, const TypeMap & typeMap, bool debug = false ); 30 size_t replace( BaseSyntaxNode * node, const DeclMap & declMap, bool debug = false ); 31 size_t replace( BaseSyntaxNode * node, const TypeMap & typeMap, bool debug = false ); 32 size_t replace( BaseSyntaxNode * node, const DeclMap & declMap, const TypeMap & typeMap, bool debug = false ); 33 34 size_t 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.