MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / parse_node_flags

Function parse_node_flags

src/ui/layout3d.c:78–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static node_flags_t parse_node_flags(const char *props_json) {
79 node_flags_t f = {false, false, false, false};
80 if (!props_json || !props_json[0])
81 return f;
82 yyjson_doc *d = yyjson_read(props_json, strlen(props_json), 0);
83 if (!d)
84 return f;
85 yyjson_val *root = yyjson_doc_get_root(d);
86 if (root && yyjson_is_obj(root)) {
87 f.is_entry = json_truthy(yyjson_obj_get(root, "is_entry_point"));
88 f.is_test = json_truthy(yyjson_obj_get(root, "is_test"));
89 f.is_exported = json_truthy(yyjson_obj_get(root, "is_exported"));
90 yyjson_val *rp = yyjson_obj_get(root, "route_path");
91 if (rp && yyjson_is_str(rp)) {
92 const char *s = yyjson_get_str(rp);
93 f.is_route = s && s[0];
94 }
95 }
96 yyjson_doc_free(d);
97 return f;
98}
99
100/* ── Node colors/sizes ────────────────────────────────────────── */
101

Callers 1

cbm_layout_from_nodesFunction · 0.85

Calls 1

json_truthyFunction · 0.85

Tested by

no test coverage detected