Helper: Parse dot notation key into prefix and field name
| 564 | |
| 565 | // Helper: Parse dot notation key into prefix and field name |
| 566 | static 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": {...}} |
| 575 | common_peg_parser common_chat_peg_builder::build_json_tools_function_is_key( |
no test coverage detected