Commit graph

25 commits

Author SHA1 Message Date
Max Brunsfeld
0aac2ab722 ⬆️ bandit 2018-10-03 21:59:28 -07:00
Max Brunsfeld
068c9841a1 Fix bug in ts_node_prev_sibling w/ empty nodes 2018-08-30 20:19:26 -07:00
Max Brunsfeld
9e8bec458d Add ts_node_edit API 2018-07-11 16:17:46 -07:00
Max Brunsfeld
df3969e9d9 Invalidate tree's parent cache after an edit 2018-07-10 14:08:30 -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
fb14cb0737
Merge pull request #172 from tree-sitter/cache-parent-nodes
Cache parent nodes to speed up `ts_node_parent` in common cases
2018-05-29 17:21:24 -07:00
Max Brunsfeld
f3014cb767 Cache parent nodes to speed up ts_node_parent in common cases 2018-05-29 16:00:32 -07:00
Max Brunsfeld
6fca8f2f4d Make ts_compile_grammar take an optional log file, start logging to it 2018-05-24 16:01:14 -07:00
Max Brunsfeld
c0763c69c4 Fix handling of aliases in TreeCursor 2018-05-22 14:43:21 -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
e75ecd1bb1 Rework API completely 2018-05-11 10:46:13 -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
Max Brunsfeld
92255bbfdd Remove document parameter from ts_node_type, ts_node_string
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-09 15:28:28 -07:00
Max Brunsfeld
973e4a44f0 Start work on removing parent pointers
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-09 12:22:19 -07:00
Max Brunsfeld
0810971f3e 🔥 symbol iterator API
This idea was never fully baked.
2018-03-08 14:16:37 -08:00
Max Brunsfeld
315dff3285 Add an API for getting a node's child index 2018-01-09 14:01:36 -08:00
Max Brunsfeld
f653f2b3bb Add ts_node_first_{child,named_child}_for_byte methods 2018-01-09 13:44:59 -08:00
Max Brunsfeld
0e69da37a5 Return a character count from the lexer's get_column method 2017-12-20 16:26:38 -08:00
Max Brunsfeld
94dc703bfc Require that grammars' start rules be visible 2017-08-04 17:07:37 -07:00
Max Brunsfeld
09f4796f6b Get tests passing w/ new alias API 2017-08-01 14:35:34 -07:00
Max Brunsfeld
f33421c53e Fix incorrect node renames in the presence of extra tokens 2017-07-18 21:24:34 -07:00
Max Brunsfeld
6dc0ff359d Rename spec -> test
'Test' is a lot more straightforward of a name.
2017-03-09 20:40:01 -08:00
Renamed from spec/runtime/node_spec.cc (Browse further)