Auto-format all source code with clang-format
This commit is contained in:
parent
b8d8386e63
commit
98cc2f2264
105 changed files with 4223 additions and 4052 deletions
|
|
@ -61,25 +61,32 @@ static inline size_t ts_tree_visible_child_count(const TSTree *tree) {
|
|||
return tree->visible_child_count;
|
||||
}
|
||||
|
||||
static inline TSChildWithPosition * ts_tree_visible_children(const TSTree *tree, size_t *count) {
|
||||
static inline TSChildWithPosition *ts_tree_visible_children(const TSTree *tree,
|
||||
size_t *count) {
|
||||
if (tree->symbol == ts_builtin_sym_error || tree->visible_child_count == 0) {
|
||||
if (count) *count = 0;
|
||||
if (count)
|
||||
*count = 0;
|
||||
return NULL;
|
||||
} else {
|
||||
if (count) *count = tree->visible_child_count;
|
||||
if (count)
|
||||
*count = tree->visible_child_count;
|
||||
return (TSChildWithPosition *)(tree + 1);
|
||||
}
|
||||
}
|
||||
|
||||
TSTree * ts_tree_make_leaf(TSSymbol symbol, size_t size, size_t offset, int is_hidden);
|
||||
TSTree * ts_tree_make_node(TSSymbol symbol, size_t child_count, TSTree **children, int is_hidden);
|
||||
TSTree * ts_tree_make_error(char lookahead_char, size_t expected_input_count, const TSSymbol *expected_inputs, size_t size, size_t offset);
|
||||
TSTree *ts_tree_make_leaf(TSSymbol symbol, size_t size, size_t offset,
|
||||
int is_hidden);
|
||||
TSTree *ts_tree_make_node(TSSymbol symbol, size_t child_count,
|
||||
TSTree **children, int is_hidden);
|
||||
TSTree *ts_tree_make_error(char lookahead_char, size_t expected_input_count,
|
||||
const TSSymbol *expected_inputs, size_t size,
|
||||
size_t offset);
|
||||
void ts_tree_retain(TSTree *tree);
|
||||
void ts_tree_release(TSTree *tree);
|
||||
int ts_tree_equals(const TSTree *tree1, const TSTree *tree2);
|
||||
char * ts_tree_string(const TSTree *tree, const char **names);
|
||||
char * ts_tree_error_string(const TSTree *tree, const char **names);
|
||||
TSTree ** ts_tree_children(const TSTree *tree, size_t *count);
|
||||
char *ts_tree_string(const TSTree *tree, const char **names);
|
||||
char *ts_tree_error_string(const TSTree *tree, const char **names);
|
||||
TSTree **ts_tree_children(const TSTree *tree, size_t *count);
|
||||
size_t ts_tree_total_size(const TSTree *tree);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue