| 70 | : mCs{std::move(cs)} |
| 71 | {} |
| 72 | auto operator()(std::string str) const -> std::vector<std::tuple<std::string, std::string>> |
| 73 | { |
| 74 | if (mCs.empty()) |
| 75 | { |
| 76 | auto const p1 = Monad<Parser>::return_ | std::string{""}; |
| 77 | return runParser | p1 | str; |
| 78 | } |
| 79 | auto const c = mCs.front(); |
| 80 | auto const cr = mCs.substr(1); |
| 81 | auto const p2 = |
| 82 | (char_ | c) |
| 83 | >> stringImpl(cr) |
| 84 | >> (return_ | mCs); |
| 85 | return runParser | p2 | str; |
| 86 | } |
| 87 | }; |
| 88 | |
| 89 | inline auto stringImpl(std::string const& cs) |
nothing calls this directly
no test coverage detected