9 #ifndef META_PARSER_MULTI_TRANSFORMER_H_
10 #define META_PARSER_MULTI_TRANSFORMER_H_
28 template <
class... Transformers>
32 static_assert(
sizeof...(Transformers) > 1,
"multi_transformer needs to "
33 "be specified with at least two "
34 "transformers to be run");
50 : transforms_{trans...}
57 return run_transforms(lnode);
62 return run_transforms(inode);
71 std::unique_ptr<node> run_transforms(
const node& n)
73 auto res = n.
accept(*transforms_[0]);
74 for (
size_t i = 1; i < transforms_.size(); ++i)
75 res = res->accept(*transforms_[i]);
82 std::array<std::unique_ptr<tree_transformer>,
sizeof...(Transformers)>
93 template <
class... Transformers>