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

Function parse_named_func_item

src/cypher/cypher.c:1383–1393  ·  view source on GitHub ↗

Parse a single-argument scalar / introspection call: labels(n), type(r), * id(n), keys(n), properties(n), toInteger(n.start_line), ... */

Source from the content-addressed store, hash-verified

1381/* Parse a single-argument scalar / introspection call: labels(n), type(r),
1382 * id(n), keys(n), properties(n), toInteger(n.start_line), ... */
1383static int parse_named_func_item(parser_t *p, cbm_return_item_t *item) {
1384 const char *canon = scalar_func_canonical(peek(p)->text);
1385 advance(p); /* consume the function name */
1386 expect(p, TOK_LPAREN);
1387 if (parse_var_dot_prop(p, item) < 0) {
1388 return CBM_NOT_FOUND;
1389 }
1390 expect(p, TOK_RPAREN);
1391 item->func = heap_strdup(canon);
1392 return 0;
1393}
1394
1395/* Canonical name for a multi-argument scalar function, or NULL. */
1396static const char *multiarg_func_canonical(const char *s) {

Callers 1

parse_return_itemFunction · 0.85

Calls 6

scalar_func_canonicalFunction · 0.85
peekFunction · 0.85
advanceFunction · 0.85
expectFunction · 0.85
parse_var_dot_propFunction · 0.85
heap_strdupFunction · 0.70

Tested by

no test coverage detected