| 50 | // --- Node text extraction --- |
| 51 | |
| 52 | char *cbm_node_text(CBMArena *a, TSNode node, const char *source) { |
| 53 | uint32_t start = ts_node_start_byte(node); |
| 54 | uint32_t end = ts_node_end_byte(node); |
| 55 | if (end <= start) { |
| 56 | return cbm_arena_strdup(a, ""); |
| 57 | } |
| 58 | return cbm_arena_strndup(a, source + start, end - start); |
| 59 | } |
| 60 | |
| 61 | // --- Keyword sets per language --- |
| 62 |
no test coverage detected