| 454 | } |
| 455 | |
| 456 | static TSNode ts_source_of(TSNode stmt) { |
| 457 | TSNode s = ts_node_child_by_field_name(stmt, TS_FIELD("source")); |
| 458 | if (!ts_node_is_null(s)) { |
| 459 | return s; |
| 460 | } |
| 461 | uint32_t nc = ts_node_child_count(stmt); |
| 462 | for (uint32_t i = 0; i < nc; i++) { |
| 463 | TSNode c = ts_node_child(stmt, i); |
| 464 | if (ts_kind(c, "string")) { |
| 465 | return c; |
| 466 | } |
| 467 | } |
| 468 | return s; |
| 469 | } |
| 470 | |
| 471 | static void ts_import_rec(ts_walk_t *w, TSNode local, char kind, TSNode src, TSNode orig) { |
| 472 | ts_sb_puts(w->sb, "\nI"); |
no test coverage detected