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

Function flow_node_value

internal/cbm/extract_k8s.c:80–92  ·  view source on GitHub ↗

The value inside a flow_node: its first named child that is not an anchor (`&name`), a tag (`!!str`) or a comment, all of which precede the value.

Source from the content-addressed store, hash-verified

78// The value inside a flow_node: its first named child that is not an anchor
79// (`&name`), a tag (`!!str`) or a comment, all of which precede the value.
80static TSNode flow_node_value(TSNode node) {
81 uint32_t n = ts_node_named_child_count(node);
82 for (uint32_t i = 0; i < n; i++) {
83 TSNode child = ts_node_named_child(node, i);
84 const char *type = ts_node_type(child);
85 if (strcmp(type, "anchor") != 0 && strcmp(type, "tag") != 0 &&
86 strcmp(type, "comment") != 0) {
87 return child;
88 }
89 }
90 TSNode null_node = {0};
91 return null_node;
92}
93
94// Return the raw source text for a scalar node (plain, single-quoted, or
95// double-quoted). Surrounding quote characters are stripped for quoted forms.

Callers 2

get_scalar_textFunction · 0.85
k8s_unwrapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected