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

Function extract_comment_text

internal/cbm/extract_defs.c:1171–1177  ·  view source on GitHub ↗

Extract comment text, truncating to MAX_COMMENT_LEN.

Source from the content-addressed store, hash-verified

1169
1170// Extract comment text, truncating to MAX_COMMENT_LEN.
1171static char *extract_comment_text(CBMArena *a, TSNode node, const char *source) {
1172 char *text = cbm_node_text(a, node, source);
1173 if (text && strlen(text) > MAX_COMMENT_LEN) {
1174 text[MAX_COMMENT_LEN] = '\0';
1175 }
1176 return text;
1177}
1178
1179// Go-specific: type_spec/type_alias comment is before the parent type_declaration.
1180static const char *extract_go_type_docstring(CBMArena *a, TSNode node, const char *source) {

Callers 3

extract_python_docstringFunction · 0.85
extract_docstringFunction · 0.85

Calls 1

cbm_node_textFunction · 0.85

Tested by

no test coverage detected