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

Function parse_named_func_item

src/cypher/cypher.c:1547–1557  ·  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

1545/* Parse a single-argument scalar / introspection call: labels(n), type(r),
1546 * id(n), keys(n), properties(n), toInteger(n.start_line), ... */
1547static int parse_named_func_item(parser_t *p, cbm_return_item_t *item) {
1548 const char *canon = scalar_func_canonical(peek(p)->text);
1549 advance(p); /* consume the function name */
1550 expect(p, TOK_LPAREN);
1551 if (parse_var_dot_prop(p, item) < 0) {
1552 return CBM_NOT_FOUND;
1553 }
1554 expect(p, TOK_RPAREN);
1555 item->func = heap_strdup(canon);
1556 return 0;
1557}
1558
1559/* Canonical name for a multi-argument scalar function, or NULL. */
1560static 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
expectFunction · 0.85
parse_var_dot_propFunction · 0.85
advanceFunction · 0.70
heap_strdupFunction · 0.70

Tested by

no test coverage detected