parent
0e046fc6c0
commit
7f2233ddaf
2 changed files with 11 additions and 0 deletions
|
|
@ -291,3 +291,12 @@ const char *ts_tree_cursor_current_field_name(const TSTreeCursor *_self) {
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
TSTreeCursor ts_tree_cursor_copy(const TSTreeCursor *_cursor) {
|
||||
const TreeCursor *cursor = (const TreeCursor *)_cursor;
|
||||
TSTreeCursor res = {NULL, NULL, {0, 0}};
|
||||
TreeCursor *copy = (TreeCursor *)&res;
|
||||
copy->tree = cursor->tree;
|
||||
array_push_all(©->stack, &cursor->stack);
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue