Fix handling of extra tokens in ts_tree_cursor_current_field_id

This commit is contained in:
Max Brunsfeld 2019-06-18 20:36:24 -07:00
parent 7ad087ce27
commit 30e73505e1
2 changed files with 39 additions and 1 deletions

View file

@ -273,6 +273,7 @@ TSFieldId ts_tree_cursor_current_field_id(const TSTreeCursor *_self) {
while (field_map < field_map_end) {
if (
!ts_subtree_extra(*entry->subtree) &&
!field_map->inherited &&
field_map->child_index == entry->structural_child_index
) return field_map->field_id;