MCPcopy Create free account
hub / github.com/BowenFu/hspp / operator()

Method operator()

include/parser.h:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
89inline auto stringImpl(std::string const& cs)

Callers

nothing calls this directly

Calls 1

stringImplFunction · 0.85

Tested by

no test coverage detected