Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/FindFunction.h

    rc6b4432 rc97b448  
    1616#pragma once
    1717
     18#include <list>       // for list
     19
    1820#include "GenPoly.h"  // for TyVarMap
    1921
     22class FunctionType;
     23class Type;
     24
    2025namespace GenPoly {
     26        typedef bool (*FindFunctionPredicate)( FunctionType*, const TyVarMap& );
     27
     28        /// recursively walk `type`, placing all functions that match `predicate` under `tyVars` into `functions`
     29        void findFunction( Type *type, std::list< FunctionType const * > &functions, const TyVarMap &tyVars, FindFunctionPredicate predicate );
     30        /// like `findFunction`, but also replaces the function type with void ()(void)
     31        void findAndReplaceFunction( Type *&type, std::list< FunctionType const * > &functions, const TyVarMap &tyVars, FindFunctionPredicate predicate );
    2132
    2233typedef bool (*FindFunctionPred)( const ast::FunctionType *, const TypeVarMap & );
Note: See TracChangeset for help on using the changeset viewer.