Changeset 7bcb8eb


Ignore:
Timestamp:
Sep 27, 2017, 4:04:57 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
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.