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

Function gql_copy_name

internal/cbm/service_patterns.c:991–1002  ·  view source on GitHub ↗

Copy the Name token at p (bounded). Returns false when p is not a Name. */

Source from the content-addressed store, hash-verified

989
990/* Copy the Name token at p (bounded). Returns false when p is not a Name. */
991static bool gql_copy_name(const char *p, char *name_buf, size_t name_sz) {
992 if (!gql_name_start((unsigned char)*p) || !name_buf || name_sz == 0) {
993 return false;
994 }
995 size_t n = 0;
996 while (gql_name_char((unsigned char)p[n]) && n + 1 < name_sz) {
997 name_buf[n] = p[n];
998 n++;
999 }
1000 name_buf[n] = '\0';
1001 return true;
1002}
1003
1004static const char *gql_operation_keyword(const char *tok, size_t len) {
1005 static const char *const kws[] = {"query", "mutation", "subscription", NULL};

Callers 1

Calls 2

gql_name_startFunction · 0.85
gql_name_charFunction · 0.85

Tested by

no test coverage detected