/** ** \file astclone/libastclone.hh ** \brief Declare functions and variables exported by the Astclone module. */ #pragma once #include #include /// Cloning an ast::Ast. namespace astclone { /** \brief Make a deep copy of an AST. ** \param tree abstract syntax tree's root. ** \return the cloned AST. */ template T* clone(const T& tree); template using applicable = auto(const A&) -> A*; template using applicable_with_bools = auto(const A&, bool, bool) -> A*; template using applicable_object = auto(const A&, const B&) -> A*; /// Have the pure function \a f side effect on \a t. template void apply(applicable f, std::unique_ptr& t1); template void apply(applicable_with_bools f, std::unique_ptr& t1, bool cond_1, bool cond_2); template void apply(applicable_object f, std::unique_ptr& t1, const B& t3); } // namespace astclone #include