4 #ifndef LEXY_DSL_EFFECT_HPP_INCLUDED
5 #define LEXY_DSL_EFFECT_HPP_INCLUDED
12 template <
typename EffRule,
typename State>
15 template <LEXY_NTTP_PARAM Fn>
18 static constexpr
auto _fn()
23 template <
typename NextParser>
26 template <
typename Context,
typename Reader,
typename... Args>
30 using state_type =
typename control_block_type::state_type;
32 if constexpr (lexy::_detail::is_detected<_detect_eff_fn, _eff, state_type>)
34 using return_type = decltype(Fn(*context.control_block->parse_state));
35 if constexpr (std::is_void_v<return_type>)
37 Fn(*context.control_block->parse_state);
43 Fn(*context.control_block->parse_state));
48 using return_type = decltype(Fn());
49 if constexpr (std::is_void_v<return_type>)
64 template <LEXY_NTTP_PARAM Fn>
68 #endif // LEXY_DSL_EFFECT_HPP_INCLUDED