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

Function c_doc_style

internal/cbm/doclink_c.c:421–436  ·  view source on GitHub ↗

A comment node's Doxygen style: 'b' a block, 'l' a line, 0 none. */

Source from the content-addressed store, hash-verified

419
420/* A comment node's Doxygen style: 'b' a block, 'l' a line, 0 none. */
421static char c_doc_style(const char *src, TSNode n) {
422 uint32_t b = ts_node_start_byte(n);
423 uint32_t e = ts_node_end_byte(n);
424 const char *p = src + b;
425 size_t len = e - b;
426 if (c_has(p, len, "/**/") || c_has(p, len, "/***")) {
427 return 0;
428 }
429 if (c_has(p, len, "/**") || c_has(p, len, "/*!")) {
430 return 'b';
431 }
432 if (c_has(p, len, "////")) {
433 return 0;
434 }
435 return (c_has(p, len, "///") || c_has(p, len, "//!")) ? 'l' : 0;
436}
437
438typedef struct {
439 CBMExtractCtx *ctx;

Callers 2

c_loose_commentFunction · 0.85
c_scope_anchorsFunction · 0.85

Calls 1

c_hasFunction · 0.85

Tested by

no test coverage detected