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

Function go_long_ref_shaped

internal/cbm/doclink_go.c:502–514  ·  view source on GitHub ↗

Bracket text longer than this scan handles: true when its bytes are those a * doc link is made of, so that it is reported instead of dropped. */

Source from the content-addressed store, hash-verified

500/* Bracket text longer than this scan handles: true when its bytes are those a
501 * doc link is made of, so that it is reported instead of dropped. */
502static bool go_long_ref_shaped(const char *s, size_t n) {
503 size_t i = (n > 0 && s[0] == '*') ? SKIP_ONE : 0;
504 if (i >= n) {
505 return false;
506 }
507 for (; i < n; i++) {
508 unsigned char c = (unsigned char)s[i];
509 if (!go_ident_byte(c) && !go_import_path_byte(c) && c != '/') {
510 return false;
511 }
512 }
513 return true;
514}
515
516/* The longest prefix of s[0..n) of at most `max` bytes that ends on a rune
517 * boundary. */

Callers 1

go_bracketFunction · 0.85

Calls 2

go_ident_byteFunction · 0.85
go_import_path_byteFunction · 0.85

Tested by

no test coverage detected