2019-01-10 15:22:39 -08:00
|
|
|
#ifndef TREE_SITTER_TREE_H_
|
|
|
|
|
#define TREE_SITTER_TREE_H_
|
2018-05-10 22:22:37 -07:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-05-29 16:00:32 -07:00
|
|
|
typedef struct {
|
|
|
|
|
const Subtree *child;
|
|
|
|
|
const Subtree *parent;
|
|
|
|
|
Length position;
|
|
|
|
|
TSSymbol alias_symbol;
|
|
|
|
|
} ParentCacheEntry;
|
|
|
|
|
|
2018-05-10 22:22:37 -07:00
|
|
|
struct TSTree {
|
2018-09-17 13:12:13 -07:00
|
|
|
Subtree root;
|
2018-05-10 22:22:37 -07:00
|
|
|
const TSLanguage *language;
|
2018-11-07 12:56:44 -08:00
|
|
|
TSRange *included_ranges;
|
|
|
|
|
unsigned included_range_count;
|
2018-05-10 22:22:37 -07:00
|
|
|
};
|
|
|
|
|
|
2018-11-07 12:56:44 -08:00
|
|
|
TSTree *ts_tree_new(Subtree root, const TSLanguage *language, const TSRange *, unsigned);
|
2018-05-16 15:44:04 -07:00
|
|
|
TSNode ts_node_new(const TSTree *, const Subtree *, Length, TSSymbol);
|
2018-05-10 22:22:37 -07:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-01-10 15:22:39 -08:00
|
|
|
#endif // TREE_SITTER_TREE_H_
|