Copy a node from an array into a heap-allocated standalone node. */
| 4009 | |
| 4010 | /* Copy a node from an array into a heap-allocated standalone node. */ |
| 4011 | static void copy_node(const cbm_node_t *src, cbm_node_t *dst) { |
| 4012 | dst->id = src->id; |
| 4013 | dst->project = heap_strdup(src->project); |
| 4014 | dst->label = heap_strdup(src->label); |
| 4015 | dst->name = heap_strdup(src->name); |
| 4016 | dst->qualified_name = heap_strdup(src->qualified_name); |
| 4017 | dst->file_path = heap_strdup(src->file_path); |
| 4018 | dst->start_line = src->start_line; |
| 4019 | dst->end_line = src->end_line; |
| 4020 | dst->properties_json = src->properties_json ? heap_strdup(src->properties_json) : NULL; |
| 4021 | } |
| 4022 | |
| 4023 | /* Build a JSON suggestions response for ambiguous or fuzzy results. */ |
| 4024 | static char *snippet_suggestions(const char *input, cbm_node_t *nodes, int count) { |
no test coverage detected