replace start and end with padding and size
This commit is contained in:
parent
a85b7fe3c4
commit
b0f6bac3ab
12 changed files with 119 additions and 65 deletions
|
|
@ -13,6 +13,7 @@ struct TSTree {
|
|||
struct TSTree *parent;
|
||||
size_t index;
|
||||
TSLength offset;
|
||||
TSPoint offset_point;
|
||||
} context;
|
||||
size_t child_count;
|
||||
size_t visible_child_count;
|
||||
|
|
@ -23,9 +24,12 @@ struct TSTree {
|
|||
};
|
||||
TSLength padding;
|
||||
TSLength size;
|
||||
|
||||
TSPoint padding_point;
|
||||
TSPoint size_point;
|
||||
|
||||
TSSymbol symbol;
|
||||
TSSourceInfo start_source_info;
|
||||
TSSourceInfo end_source_info;
|
||||
|
||||
struct {
|
||||
TSNodeType type : 2;
|
||||
bool extra : 1;
|
||||
|
|
@ -36,18 +40,19 @@ struct TSTree {
|
|||
unsigned short int ref_count;
|
||||
};
|
||||
|
||||
TSTree *ts_tree_make_leaf(TSSymbol, TSLength, TSLength, TSSourceInfo,
|
||||
TSSourceInfo, TSNodeType);
|
||||
TSTree *ts_tree_make_leaf(TSSymbol, TSLength, TSLength, TSPoint,
|
||||
TSPoint, TSNodeType);
|
||||
TSTree *ts_tree_make_node(TSSymbol, size_t, TSTree **, TSNodeType);
|
||||
TSTree *ts_tree_make_error(TSLength size, TSLength padding,
|
||||
TSSourceInfo start_source_info,
|
||||
TSSourceInfo end_source_info, char lookahead_char);
|
||||
TSPoint padding_point,
|
||||
TSPoint size_point, char lookahead_char);
|
||||
void ts_tree_retain(TSTree *tree);
|
||||
void ts_tree_release(TSTree *tree);
|
||||
bool ts_tree_eq(const TSTree *tree1, const TSTree *tree2);
|
||||
char *ts_tree_string(const TSTree *tree, const char **names,
|
||||
bool include_anonymous);
|
||||
TSLength ts_tree_total_size(const TSTree *tree);
|
||||
TSPoint ts_tree_total_size_point(const TSTree *self);
|
||||
void ts_tree_prepend_children(TSTree *, size_t, TSTree **);
|
||||
void ts_tree_edit(TSTree *, TSInputEdit);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue