| 1517 | } |
| 1518 | |
| 1519 | static int parse_var_dot_prop(parser_t *p, cbm_return_item_t *item) { |
| 1520 | const cbm_token_t *var = expect(p, TOK_IDENT); |
| 1521 | if (!var) { |
| 1522 | return CBM_NOT_FOUND; |
| 1523 | } |
| 1524 | item->variable = heap_strdup(var->text); |
| 1525 | if (match(p, TOK_DOT)) { |
| 1526 | const cbm_token_t *prop = expect(p, TOK_IDENT); |
| 1527 | if (prop) { |
| 1528 | item->property = heap_strdup(prop->text); |
| 1529 | } |
| 1530 | } |
| 1531 | return 0; |
| 1532 | } |
| 1533 | |
| 1534 | /* True if the cursor is at `IDENT(` where IDENT is a supported scalar function. */ |
| 1535 | static bool is_named_func_call(parser_t *p) { |
no test coverage detected