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