Max Brunsfeld
1b482f0785
Reorder TSTreeCursor fields so it has the same structure as internal TreeCursor
2018-11-07 15:11:21 -08:00
Max Brunsfeld
af01846fd7
Add ts_tree_cursor_reset function
2018-10-21 10:39:05 -07:00
Max Brunsfeld
b29d0f622f
Cram terminal subtree data into a 64-bit integer when possible
2018-09-17 18:52:34 -07:00
Max Brunsfeld
77e4caef4f
Revert "Store trees' children in TreeArrays, not w/ separate pointer and length"
...
This reverts commit 09be0b6ef5 .
2018-08-31 10:41:06 -07:00
Max Brunsfeld
5ab6401478
Fix TreeCursor bugs
...
* ts_tree_cursor_goto_first_child_for_byte failed to find the child
in some cases
* ts_tree_cursor_goto_parent did not handle aliased invisible parent
nodes
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-28 16:17:16 -07:00
Max Brunsfeld
89b6a14d9f
Allow creating a tree cursor starting at any node, not just the root
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:54:04 -07:00
Max Brunsfeld
703541e838
Explicitly initialize variable in ts_tree_cursor_goto_next_sibling
2018-06-18 10:48:32 -07:00
Max Brunsfeld
babb8261a3
Extract an iterator from TreeCursor methods
2018-05-22 14:43:21 -07:00
Max Brunsfeld
c0763c69c4
Fix handling of aliases in TreeCursor
2018-05-22 14:43:21 -07:00
Max Brunsfeld
80630ce504
Store nodes' public-facing positions, not pre-padding positions
2018-05-22 08:50:04 -07:00
Max Brunsfeld
5ec3769cb4
Make ts_tree_cursor_current_node take the cursor as const
2018-05-17 14:24:32 -07:00
Max Brunsfeld
e3670be42f
Avoid one heap allocation when instantiating a TSTreeCursor
2018-05-16 16:05:08 -07:00
Max Brunsfeld
6fc8d9871c
Hide the details of TSNode's fields in the public API
2018-05-16 15:44:04 -07:00
Max Brunsfeld
ebddb1a0b5
Add ts_tree_cursor_goto_first_child_for_byte method
...
Atom needs this for efficiently seeking to the leaf node at a given position,
visiting all of its ancestors along the way.
2018-05-16 13:51:21 -07:00
Max Brunsfeld
fe53506175
Declare subtrees as const wherever possible
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 15:06:13 -07:00
Max Brunsfeld
e75ecd1bb1
Rework API completely
2018-05-11 10:46:13 -07:00
Max Brunsfeld
35510a612d
Rename Tree -> Subtree
2018-05-10 15:11:14 -07:00
Max Brunsfeld
666dfb76d2
Remove document parameter from ts_node_type, ts_node_string
...
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-09 16:47:47 -07:00