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

Function go_block_comment

internal/cbm/doclink_go.c:621–633  ·  view source on GitHub ↗

The lines of one block comment body [c, end); returns the line breaks in it. */

Source from the content-addressed store, hash-verified

619
620/* The lines of one block comment body [c, end); returns the line breaks in it. */
621static uint32_t go_block_comment(go_doc_t *d, const char *c, const char *end, uint32_t line) {
622 uint32_t added = 0;
623 for (;;) {
624 const char *nl = (const char *)memchr(c, '\n', (size_t)(end - c));
625 const char *le = nl ? nl : end;
626 go_push_line(d, c, (size_t)(le - c), line + added);
627 if (!nl) {
628 return added;
629 }
630 added++;
631 c = nl + SKIP_ONE;
632 }
633}
634
635/* ast.CommentGroup.Text over the stored comment group: one comment per text
636 * line, a block comment keeping its own lines. Text line k of the group is

Callers 1

go_group_linesFunction · 0.85

Calls 1

go_push_lineFunction · 0.85

Tested by

no test coverage detected