Add concrete_child and concrete_child_count Node methods

This commit is contained in:
Max Brunsfeld 2015-09-07 21:11:37 -07:00
parent 557c8c7f28
commit c3f3f19ea8
7 changed files with 166 additions and 51 deletions

View file

@ -17,9 +17,9 @@ typedef struct TSTree TSTree;
typedef unsigned short TSStateId;
typedef enum {
TSNodeTypeNormal,
TSNodeTypeConcrete,
TSNodeTypeHidden,
TSNodeTypeConcrete,
TSNodeTypeNormal,
} TSNodeType;
typedef struct TSLexer {

View file

@ -51,6 +51,8 @@ TSLength ts_node_size(TSNode);
TSSymbol ts_node_sym(TSNode);
TSNode ts_node_child(TSNode, size_t);
size_t ts_node_child_count(TSNode);
TSNode ts_node_concrete_child(TSNode, size_t);
size_t ts_node_concrete_child_count(TSNode);
TSNode ts_node_find_for_pos(TSNode, size_t);
TSNode ts_node_find_for_range(TSNode, size_t, size_t);
TSNode ts_node_parent(TSNode);
@ -59,6 +61,7 @@ TSNode ts_node_prev_sibling(TSNode);
const char *ts_node_name(TSNode, const TSDocument *);
const char *ts_node_string(TSNode, const TSDocument *);
bool ts_node_eq(TSNode, TSNode);
bool ts_node_is_concrete(TSNode);
TSDocument *ts_document_make();
void ts_document_free(TSDocument *);