Commit graph

11 commits

Author SHA1 Message Date
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