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

Function unwrap_pair_value

internal/cbm/extract_k8s.c:249–258  ·  view source on GitHub ↗

Unwrap a block_mapping_pair value through optional block_node.

Source from the content-addressed store, hash-verified

247
248// Unwrap a block_mapping_pair value through optional block_node.
249static TSNode unwrap_pair_value(TSNode pair) {
250 TSNode val_node = ts_node_named_child(pair, SKIP_ONE);
251 if (ts_node_is_null(val_node)) {
252 return val_node;
253 }
254 if (strcmp(ts_node_type(val_node), "block_node") == 0) {
255 val_node = ts_node_named_child(val_node, 0);
256 }
257 return val_node;
258}
259
260// Descend into the first block_mapping of a document and extract
261// kind and metadata.name. Returns void; fills kind_buf and meta_name_buf.

Callers 2

emit_kustomize_kind_defFunction · 0.85
extract_k8s_scalarsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected