| 1 |
#ifndef TREE_SITTER_TREE_H_ |
| 2 |
#define TREE_SITTER_TREE_H_ |
| 3 |
|
| 4 |
#include "./subtree.h" |
| 5 |
|
| 6 |
#ifdef __cplusplus |
| 7 |
extern "C" { |
| 8 |
#endif |
| 9 |
|
| 10 |
typedef struct { |
| 11 |
const Subtree *child; |
| 12 |
const Subtree *parent; |
| 13 |
Length position; |
| 14 |
TSSymbol alias_symbol; |
| 15 |
} ParentCacheEntry; |
| 16 |
|
| 17 |
struct TSTree { |
| 18 |
Subtree root; |
| 19 |
const TSLanguage *language; |
| 20 |
TSRange *included_ranges; |
| 21 |
unsigned included_range_count; |
| 22 |
}; |
| 23 |
|
| 24 |
TSTree *ts_tree_new(Subtree root, const TSLanguage *language, const TSRange *included_ranges, unsigned included_range_count); |
| 25 |
TSNode ts_node_new(const TSTree *tree, const Subtree *subtree, Length position, TSSymbol alias); |
| 26 |
|
| 27 |
#ifdef __cplusplus |
| 28 |
} |
| 29 |
#endif |
| 30 |
|
| 31 |
#endif // TREE_SITTER_TREE_H_ |