| 138 | } |
| 139 | |
| 140 | static const char *dk_text(const dk_t *d, TSNode n) { |
| 141 | uint32_t b = ts_node_start_byte(n); |
| 142 | uint32_t e = ts_node_end_byte(n); |
| 143 | char *s = cbm_arena_alloc(d->a, (size_t)(e - b) + SKIP_ONE); |
| 144 | if (s) { |
| 145 | memcpy(s, d->src + b, e - b); |
| 146 | s[e - b] = '\0'; |
| 147 | } |
| 148 | return s; |
| 149 | } |
| 150 | |
| 151 | /* A value as written: quotes of a quoted string removed. */ |
| 152 | static const char *dk_value(const dk_t *d, TSNode n) { |
no test coverage detected