| 4613 | #endif |
| 4614 | |
| 4615 | void config_parse_ctre(std::string_view config_text, std::vector<std::pair<std::string, std::string>> &settings) { |
| 4616 | // ! CTRE isn't currently handling the `$` anchor correctly. |
| 4617 | // ! The current workaround is to add `?` to the last whitespace group. |
| 4618 | // ! https://github.com/hanickadot/compile-time-regular-expressions/issues/334#issuecomment-2571614075 |
| 4619 | constexpr auto regex_fsm = regex_for_config_ctre(); |
| 4620 | for (auto match : regex_fsm(config_text)) { |
| 4621 | std::string_view key = match.get<1>().to_view(); |
| 4622 | std::string_view value = match.get<2>().to_view(); |
| 4623 | settings.emplace_back(key, value); |
| 4624 | } |
| 4625 | } |
| 4626 | |
| 4627 | void parse_ctre(bm::State &state, std::string_view config_text) { |
| 4628 | std::size_t pairs = 0, bytes = 0; |
no test coverage detected