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

Function pr_name_end

src/pipeline/doc_links_php.c:452–462  ·  view source on GitHub ↗

The end of a name (`\`-joined identifiers, a leading `\` allowed) at s[0]. */

Source from the content-addressed store, hash-verified

450
451/* The end of a name (`\`-joined identifiers, a leading `\` allowed) at s[0]. */
452static size_t pr_name_end(const char *s, size_t n) {
453 size_t i = (n > 0 && s[0] == '\\') ? SKIP_ONE : 0;
454 size_t e = pr_ident_end(s, i, n);
455 if (e == i) {
456 return 0;
457 }
458 while (e + SKIP_ONE < n && s[e] == '\\' && pr_ident_start(s[e + SKIP_ONE])) {
459 e = pr_ident_end(s, e + SKIP_ONE, n);
460 }
461 return e;
462}
463
464static bool pr_parse(const char *s, size_t n, pr_ref_t *r) {
465 memset(r, 0, sizeof(*r));

Callers 1

pr_parseFunction · 0.85

Calls 2

pr_ident_endFunction · 0.85
pr_ident_startFunction · 0.85

Tested by

no test coverage detected