blob: 904c88ef9301461fa5252bc3261d3ec0030b67ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include "tree_sitter/api.h"
#include "string.h"
void ts_tree_root_node_p(TSTree *tree, TSNode *node) {
(*node) = ts_tree_root_node(tree);
}
uint32_t ts_node_named_child_count_p(TSNode *node) {
return ts_node_named_child_count(*node);
}
uint32_t ts_node_start_byte_p(TSNode *node) {
return ts_node_start_byte(*node);
}
uint32_t ts_node_end_byte_p(TSNode *node) {
return ts_node_end_byte(*node);
}
uint32_t ts_node_start_point_p(TSNode *node, TSPoint *point) {
(*point) = ts_node_start_point(*node);
}
uint32_t ts_node_end_point_p(TSNode *node, TSPoint *point) {
(*point) = ts_node_end_point(*node);
}
const char* ts_node_type_p(TSNode *node) {
return ts_node_type(*node);
}
void ts_node_named_child_p(TSNode* self, uint32_t child_index, TSNode* node) {
(*node) = ts_node_named_child(*self, child_index);
}
|