| 574 | } |
| 575 | |
| 576 | static bool call_node_text_equals(const char *source, TSNode node, const char *expected) { |
| 577 | if (!source || ts_node_is_null(node) || !expected) { |
| 578 | return false; |
| 579 | } |
| 580 | uint32_t start = ts_node_start_byte(node); |
| 581 | uint32_t end = ts_node_end_byte(node); |
| 582 | size_t expected_len = strlen(expected); |
| 583 | return end >= start && (size_t)(end - start) == expected_len && |
| 584 | memcmp(source + start, expected, expected_len) == 0; |
| 585 | } |
| 586 | |
| 587 | static bool call_node_text_in(TSNode node, const char *source, const char *const *values) { |
| 588 | for (const char *const *value = values; *value; value++) { |