Copy a node from an array into a heap-allocated standalone node. */
| 8351 | |
| 8352 | /* Copy a node from an array into a heap-allocated standalone node. */ |
| 8353 | static void copy_node(const cbm_node_t *src, cbm_node_t *dst) { |
| 8354 | dst->id = src->id; |
| 8355 | dst->project = heap_strdup(src->project); |
| 8356 | dst->label = heap_strdup(src->label); |
| 8357 | dst->name = heap_strdup(src->name); |
| 8358 | dst->qualified_name = heap_strdup(src->qualified_name); |
| 8359 | dst->file_path = heap_strdup(src->file_path); |
| 8360 | dst->start_line = src->start_line; |
| 8361 | dst->end_line = src->end_line; |
| 8362 | dst->properties_json = src->properties_json ? heap_strdup(src->properties_json) : NULL; |
| 8363 | } |
| 8364 | |
| 8365 | /* Build a JSON suggestions response for ambiguous or fuzzy results. */ |
| 8366 | static char *snippet_suggestions(const char *input, cbm_node_t *nodes, int count) { |
no test coverage detected