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

Function parse_named_func_item

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

1514/* Parse a single-argument scalar / introspection call: labels(n), type(r),
1515 * id(n), keys(n), properties(n), toInteger(n.start_line), ... */
1516static int parse_named_func_item(parser_t *p, cbm_return_item_t *item) {
1517 const char *canon = scalar_func_canonical(peek(p)->text);
1518 advance(p); /* consume the function name */
1519 expect(p, TOK_LPAREN);
1520 if (parse_var_dot_prop(p, item) < 0) {
1521 return CBM_NOT_FOUND;
1522 }
1523 expect(p, TOK_RPAREN);
1524 item->func = heap_strdup(canon);
1525 return 0;
1526}
1527
1528/* Canonical name for a multi-argument scalar function, or NULL. */
1529static 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