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

Function is_cmake_function_parameter

internal/cbm/extract_usages.c:760–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758}
759
760static bool is_cmake_function_parameter(TSNode node) {
761 if (strcmp(ts_node_type(node), "unquoted_argument") != 0) {
762 return false;
763 }
764 TSNode argument = ts_node_parent(node);
765 TSNode arguments = ts_node_parent(argument);
766 TSNode command = ts_node_parent(arguments);
767 if (ts_node_is_null(argument) || strcmp(ts_node_type(argument), "argument") != 0 ||
768 ts_node_is_null(arguments) || strcmp(ts_node_type(arguments), "argument_list") != 0 ||
769 ts_node_is_null(command) ||
770 (strcmp(ts_node_type(command), "function_command") != 0 &&
771 strcmp(ts_node_type(command), "macro_command") != 0)) {
772 return false;
773 }
774 uint32_t count = ts_node_named_child_count(arguments);
775 for (uint32_t i = 1; i < count; i++) {
776 if (node_contains(ts_node_named_child(arguments, i), node)) {
777 return true;
778 }
779 }
780 return false;
781}
782
783static bool fish_argument_marker(CBMExtractCtx *ctx, TSNode node) {
784 char *text = cbm_node_text(ctx->arena, node, ctx->source);

Callers 1

Calls 1

node_containsFunction · 0.85

Tested by

no test coverage detected