A string literal's content (quotes dropped). */
| 443 | |
| 444 | /* A string literal's content (quotes dropped). */ |
| 445 | static void ts_string_field(ts_walk_t *w, TSNode s) { |
| 446 | uint32_t b = ts_node_start_byte(s); |
| 447 | uint32_t e = ts_node_end_byte(s); |
| 448 | const char *src = w->ctx->source; |
| 449 | if (e - b >= PAIR_LEN && (src[b] == '"' || src[b] == '\'' || src[b] == '`')) { |
| 450 | b++; |
| 451 | e--; |
| 452 | } |
| 453 | ts_sb_field(w->sb, src + b, e - b); |
| 454 | } |
| 455 | |
| 456 | static TSNode ts_source_of(TSNode stmt) { |
| 457 | TSNode s = ts_node_child_by_field_name(stmt, TS_FIELD("source")); |
no test coverage detected