The positional fields of a tuple struct: members `0`, `1` ... without a * node. */
| 2857 | /* The positional fields of a tuple struct: members `0`, `1` ... without a |
| 2858 | * node. */ |
| 2859 | static void rs_scan_tuple_fields(rs_scan_t *s, TSNode body) { |
| 2860 | TSTreeCursor cur = ts_tree_cursor_new(body); |
| 2861 | uint32_t index = 0; |
| 2862 | bool more = ts_tree_cursor_goto_first_child(&cur); |
| 2863 | for (; more && !s->failed; more = ts_tree_cursor_goto_next_sibling(&cur)) { |
| 2864 | const char *field = ts_tree_cursor_current_field_name(&cur); |
| 2865 | if (!field || strcmp(field, "type") != 0) { |
| 2866 | continue; |
| 2867 | } |
| 2868 | char name[RS_UINT_DIGITS]; |
| 2869 | snprintf(name, sizeof(name), "%u", index++); |
| 2870 | rs_rec_member(s, 0, 'd', name, CBM_NOT_FOUND); |
| 2871 | } |
| 2872 | ts_tree_cursor_delete(&cur); |
| 2873 | } |
| 2874 | |
| 2875 | /* ── Scope scan: `use` ───────────────────────────────────────────── */ |
| 2876 |
no test coverage detected