Added optimize_ast

This commit is contained in:
yhirose 2017-03-28 22:50:05 -04:00
parent 6b63bd48af
commit ff3d947fd4

View File

@ -2284,6 +2284,13 @@ private:
const std::vector<std::string> filters_;
};
template <typename T>
static std::shared_ptr<T> optimize_ast(
std::shared_ptr<T> ast,
const std::vector<std::string>& filters = {}) {
return AstOptimizer(true, filters).optimize(ast);
}
struct EmptyType {};
typedef AstBase<EmptyType> Ast;