MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / consume_regex

Method consume_regex

smallthinker/common/chat-parser.cpp:194–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194common_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
201std::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_);

Callers 4

test_regexFunction · 0.80
parse_json_tool_callsFunction · 0.80

Calls 2

strMethod · 0.45

Tested by 1

test_regexFunction · 0.64