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