Make ts_tree_cursor_current_node take the cursor as const

This commit is contained in:
Max Brunsfeld 2018-05-17 14:24:32 -07:00
parent 074c051094
commit 5ec3769cb4
2 changed files with 3 additions and 3 deletions

View file

@ -129,7 +129,7 @@ bool ts_tree_cursor_goto_first_child(TSTreeCursor *);
int64_t ts_tree_cursor_goto_first_child_for_byte(TSTreeCursor *, uint32_t);
bool ts_tree_cursor_goto_next_sibling(TSTreeCursor *);
bool ts_tree_cursor_goto_parent(TSTreeCursor *);
TSNode ts_tree_cursor_current_node(TSTreeCursor *);
TSNode ts_tree_cursor_current_node(const TSTreeCursor *);
uint32_t ts_language_symbol_count(const TSLanguage *);
const char *ts_language_symbol_name(const TSLanguage *, TSSymbol);

View file

@ -170,8 +170,8 @@ bool ts_tree_cursor_goto_parent(TSTreeCursor *_self) {
return false;
}
TSNode ts_tree_cursor_current_node(TSTreeCursor *_self) {
TreeCursor *self = (TreeCursor *)_self;
TSNode ts_tree_cursor_current_node(const TSTreeCursor *_self) {
const TreeCursor *self = (const TreeCursor *)_self;
TreeCursorEntry *last_entry = array_back(&self->stack);
TSSymbol alias_symbol = 0;
if (self->stack.size > 1) {