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

Function extract_binary_concat_suffix

internal/cbm/extract_calls.c:2781–2794  ·  view source on GitHub ↗

`prefixVar + "/route"` (Go's idiomatic configurable-base-path pattern): recover the literal suffix. A right side that is not itself a literal is left unresolved rather than guessed (issue #1249).

Source from the content-addressed store, hash-verified

2779// recover the literal suffix. A right side that is not itself a literal is
2780// left unresolved rather than guessed (issue #1249).
2781static const char *extract_binary_concat_suffix(CBMExtractCtx *ctx, TSNode node) {
2782 TSNode op_node = ts_node_child_by_field_name(node, TS_FIELD("operator"));
2783 if (!ts_node_is_null(op_node)) {
2784 char *op = cbm_node_text(ctx->arena, op_node, ctx->source);
2785 if (!op || strcmp(op, "+") != 0) {
2786 return NULL;
2787 }
2788 }
2789 TSNode rhs = ts_node_child_by_field_name(node, TS_FIELD("right"));
2790 if (ts_node_is_null(rhs) || !is_string_like(ts_node_type(rhs))) {
2791 return NULL;
2792 }
2793 return strip_and_validate_string_arg(ctx->arena, cbm_node_text(ctx->arena, rhs, ctx->source));
2794}
2795
2796// Try to extract URL/topic from a positional argument (string or constant).
2797/* Swift names its call arguments, so each one is a value_argument that may lead

Callers 1

extract_positional_urlFunction · 0.85

Calls 3

cbm_node_textFunction · 0.85
is_string_likeFunction · 0.85

Tested by

no test coverage detected