Parse a single-argument scalar / introspection call: labels(n), type(r), * id(n), keys(n), properties(n), toInteger(n.start_line), ... */
| 1545 | /* Parse a single-argument scalar / introspection call: labels(n), type(r), |
| 1546 | * id(n), keys(n), properties(n), toInteger(n.start_line), ... */ |
| 1547 | static 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. */ |
| 1560 | static const char *multiarg_func_canonical(const char *s) { |
no test coverage detected