| 192 | } |
| 193 | |
| 194 | common_chat_msg_parser::find_regex_result common_chat_msg_parser::consume_regex(const common_regex & regex) { |
| 195 | if (auto result = try_consume_regex(regex)) { |
| 196 | return *result; |
| 197 | } |
| 198 | throw common_chat_msg_partial_exception(regex.str()); |
| 199 | } |
| 200 | |
| 201 | std::optional<common_chat_msg_parser::find_regex_result> common_chat_msg_parser::try_consume_regex(const common_regex & regex) { |
| 202 | auto m = regex.search(input_, pos_); |