Copy a node from an array into a heap-allocated standalone node. */
| 12633 | |
| 12634 | /* Copy a node from an array into a heap-allocated standalone node. */ |
| 12635 | static void copy_node(const cbm_node_t *src, cbm_node_t *dst) { |
| 12636 | dst->id = src->id; |
| 12637 | dst->project = heap_strdup(src->project); |
| 12638 | dst->label = heap_strdup(src->label); |
| 12639 | dst->name = heap_strdup(src->name); |
| 12640 | dst->qualified_name = heap_strdup(src->qualified_name); |
| 12641 | dst->file_path = heap_strdup(src->file_path); |
| 12642 | dst->start_line = src->start_line; |
| 12643 | dst->end_line = src->end_line; |
| 12644 | dst->properties_json = src->properties_json ? heap_strdup(src->properties_json) : NULL; |
| 12645 | } |
| 12646 | |
| 12647 | /* Build a JSON suggestions response for ambiguous or fuzzy results. */ |
| 12648 | static char *snippet_suggestions(const char *input, cbm_node_t *nodes, int count) { |
no test coverage detected