| 6283 | typename LocalState, |
| 6284 | typename ParamsTuple> |
| 6285 | struct callback_rule |
| 6286 | : parser_interface< |
| 6287 | rule_parser<true, TagType, Attribute, LocalState, ParamsTuple>> |
| 6288 | { |
| 6289 | constexpr callback_rule(char const * diagnostic_text) |
| 6290 | { |
| 6291 | this->parser_.diagnostic_text_ = diagnostic_text; |
| 6292 | } |
| 6293 | |
| 6294 | template<typename T, typename... Ts> |
| 6295 | constexpr auto with(T && x, Ts &&... xs) const |
| 6296 | { |
| 6297 | BOOST_PARSER_ASSERT( |
| 6298 | (detail::is_nope_v<ParamsTuple> && |
| 6299 | "If you're seeing this, you tried to chain calls on a " |
| 6300 | "callback_rule, like 'rule.with(foo).with(bar)'. Quit it!'")); |
| 6301 | using params_tuple_type = decltype(detail::hl::make_tuple( |
| 6302 | static_cast<T &&>(x), static_cast<Ts &&>(xs)...)); |
| 6303 | using rule_parser_type = rule_parser< |
| 6304 | true, |
| 6305 | TagType, |
| 6306 | Attribute, |
| 6307 | LocalState, |
| 6308 | params_tuple_type>; |
| 6309 | using result_type = parser_interface<rule_parser_type>; |
| 6310 | return result_type{rule_parser_type{ |
| 6311 | this->parser_.diagnostic_text_, |
| 6312 | detail::hl::make_tuple( |
| 6313 | static_cast<T &&>(x), static_cast<Ts &&>(xs)...)}}; |
| 6314 | } |
| 6315 | }; |
| 6316 | |
| 6317 | //[ define_rule_definition |
| 6318 | #define BOOST_PARSER_DEFINE_IMPL(_, rule_name_) \ |
nothing calls this directly
no outgoing calls
no test coverage detected