tree-sitter/lib/src/tree.h

32 lines
663 B
C
Raw Normal View History

#ifndef TREE_SITTER_TREE_H_
#define TREE_SITTER_TREE_H_
2018-05-10 22:22:37 -07:00
#include "./subtree.h"
2018-05-10 22:22:37 -07:00
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
const Subtree *child;
const Subtree *parent;
Length position;
TSSymbol alias_symbol;
} ParentCacheEntry;
2018-05-10 22:22:37 -07:00
struct TSTree {
Subtree root;
2018-05-10 22:22:37 -07:00
const TSLanguage *language;
TSRange *included_ranges;
unsigned included_range_count;
2018-05-10 22:22:37 -07:00
};
TSTree *ts_tree_new(Subtree root, const TSLanguage *language, const TSRange *included_ranges, unsigned included_range_count);
TSNode ts_node_new(const TSTree *tree, const Subtree *subtree, Length position, TSSymbol alias);
2018-05-10 22:22:37 -07:00
#ifdef __cplusplus
}
#endif
#endif // TREE_SITTER_TREE_H_