Changeset 7bcb8eb


Ignore:
Timestamp:
Sep 27, 2017, 4:04:57 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
ec010a9
Parents:
b6d6e97
Message:

Add VarExprReplacer::replace convenience function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/VarExprReplacer.h

    rb6d6e97 r7bcb8eb  
    2929private:
    3030        const DeclMap & declMap;
    31   bool debug;
     31        bool debug;
    3232public:
    3333        VarExprReplacer( const DeclMap & declMap, bool debug = false );
     
    3535        // replace variable with new node from decl map
    3636        virtual void visit( VariableExpr * varExpr );
     37
     38        static void replace( BaseSyntaxNode * node, const DeclMap & declMap, bool debug = false ) {
     39                VarExprReplacer replacer( declMap, debug );
     40                maybeAccept( node, replacer );
     41        }
    3742};
    3843
Note: See TracChangeset for help on using the changeset viewer.