| 1487 | } |
| 1488 | |
| 1489 | static int parse_var_dot_prop(parser_t *p, cbm_return_item_t *item) { |
| 1490 | const cbm_token_t *var = expect(p, TOK_IDENT); |
| 1491 | if (!var) { |
| 1492 | return CBM_NOT_FOUND; |
| 1493 | } |
| 1494 | item->variable = heap_strdup(var->text); |
| 1495 | if (match(p, TOK_DOT)) { |
| 1496 | const cbm_token_t *prop = expect(p, TOK_IDENT); |
| 1497 | if (prop) { |
| 1498 | item->property = heap_strdup(prop->text); |
| 1499 | } |
| 1500 | } |
| 1501 | return 0; |
| 1502 | } |
| 1503 | |
| 1504 | /* True if the cursor is at `IDENT(` where IDENT is a supported scalar function. */ |
| 1505 | static bool is_named_func_call(parser_t *p) { |
no test coverage detected