MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / parse_key_spec

Function parse_key_spec

common/chat-peg-parser.cpp:566–572  ·  view source on GitHub ↗

Helper: Parse dot notation key into prefix and field name

Source from the content-addressed store, hash-verified

564
565// Helper: Parse dot notation key into prefix and field name
566static std::pair<std::string, std::string> parse_key_spec(const std::string & key) {
567 auto dot_pos = key.find('.');
568 if (dot_pos == std::string::npos) {
569 return {"", key}; // Top-level field
570 }
571 return {key.substr(0, dot_pos), key.substr(dot_pos + 1)};
572}
573
574// Mode 1: function_is_key — parse {"function_name": {...}}
575common_peg_parser common_chat_peg_builder::build_json_tools_function_is_key(

Callers 2

standard_json_toolsMethod · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected