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