Changes in src/SynTree/DeclReplacer.h [0ce063b:7862059]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/DeclReplacer.h
r0ce063b r7862059 26 26 typedef std::map< DeclarationWithType *, DeclarationWithType * > DeclMap; 27 27 typedef std::map< TypeDecl *, TypeDecl * > TypeMap; 28 typedef std::map< DeclarationWithType *, Expression * > ExprMap;29 28 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 } 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 ); 43 32 } 44 33
Note: See TracChangeset
for help on using the changeset viewer.