Changeset c3b3799 for src/SynTree


Ignore:
Timestamp:
Sep 27, 2017, 4:25:27 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
97dbc09
Parents:
4e66a18
git-author:
Rob Schluntz <rschlunt@…> (09/27/17 16:04:57)
git-committer:
Rob Schluntz <rschlunt@…> (09/27/17 16:25:27)
Message:

Add VarExprReplacer::replace convenience function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/VarExprReplacer.h

    r4e66a18 rc3b3799  
    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.