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

Function handle_yaml_nested

internal/cbm/extract_unified.c:2008–2027  ·  view source on GitHub ↗

Handle YAML files: walk top-level block_mapping recursively */

Source from the content-addressed store, hash-verified

2006
2007/* Handle YAML files: walk top-level block_mapping recursively */
2008static void handle_yaml_nested(CBMExtractCtx *ctx, TSNode node) {
2009 if (ctx->language != CBM_LANG_YAML) {
2010 return;
2011 }
2012 const char *kind = ts_node_type(node);
2013 if (strcmp(kind, "block_mapping") != 0) {
2014 return;
2015 }
2016 /* Only process root-level block_mapping (depth 0 or 1) */
2017 TSNode parent = ts_node_parent(node);
2018 if (ts_node_is_null(parent)) {
2019 walk_yaml_mapping(ctx, node, NULL);
2020 } else {
2021 const char *pk = ts_node_type(parent);
2022 if (strcmp(pk, "stream") == 0 || strcmp(pk, "document") == 0 ||
2023 strcmp(pk, "block_node") == 0) {
2024 walk_yaml_mapping(ctx, node, NULL);
2025 }
2026 }
2027}
2028
2029// --- Main unified cursor walk ---
2030

Callers 1

cbm_extract_unifiedFunction · 0.85

Calls 1

walk_yaml_mappingFunction · 0.85

Tested by

no test coverage detected