| 599 | /* ── JSON ─────────────────────────────────────────────────────── */ |
| 600 | |
| 601 | static void fl_add_node_ref(yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *field, |
| 602 | const flow_node_t *node) { |
| 603 | yyjson_mut_val *ref = yyjson_mut_obj(doc); |
| 604 | yyjson_mut_obj_add_int(doc, ref, "id", node->id); |
| 605 | yyjson_mut_obj_add_strcpy(doc, ref, "name", node->name ? node->name : "?"); |
| 606 | if (node->file_path) |
| 607 | yyjson_mut_obj_add_strcpy(doc, ref, "file_path", node->file_path); |
| 608 | yyjson_mut_obj_add_val(doc, obj, field, ref); |
| 609 | } |
| 610 | |
| 611 | /* A display name with context when the bare name is ambiguous: dunders and |
| 612 | * very short names get their file stem prefixed ("datastructures.__init__"), |
no outgoing calls
no test coverage detected