dundargoc
df1fe842eb
docs: various fixes
...
Closes https://github.com/tree-sitter/tree-sitter/issues/1317 .
Closes https://github.com/tree-sitter/tree-sitter/issues/1752 .
Closes https://github.com/tree-sitter/tree-sitter/issues/2439 .
Co-authored-by: Simon Hengel <sol@typeful.net>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Laytan Laats <laytanlaats@hotmail.com>
2024-02-08 00:08:59 +01:00
Amaan Qureshi
59be1edaa1
refactor: swap &Vec[T] with &[T] where appropriate
2024-02-07 02:50:31 -05:00
dundargoc
c8bd6705cf
chore: clippy
2024-02-06 23:34:14 -05:00
Amaan Qureshi
04ff704bca
chore(cli): apply clippy fixes
2024-02-04 04:18:48 -05:00
Max Brunsfeld
da16cb1459
Introduce language ref-count management C APIs, remove Copy impl for Language in Rust
2023-12-27 14:59:16 -08:00
Daumantas Kavolis
e26e23fd0e
Fix formatting
2023-10-25 10:24:35 +03:00
Daumantas Kavolis
e265929f90
Fix goto_previous_sibling with padded first children
2023-10-25 10:19:03 +03:00
Andrew Hlynskyi
a5a7564818
chore(rust): add error reporting for position funcs
2023-10-05 17:24:01 +03:00
Daumantas Kavolis
ec90c215ae
Add tests for bidirectional cursor
2023-08-02 00:02:33 +03:00
Max Brunsfeld
da6e24de17
Fix adjustment of trees' included ranges on edits
...
Previously, when an included range started or ended *inside* of
an edit, that range did not get updated correctly.
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2022-11-07 16:52:19 -08:00
Max Brunsfeld
53ed4cf037
Tolerate tree edits whose old range extends beyond the end of the tree
2022-08-25 10:20:40 -07:00
Max Brunsfeld
cb4317ba8e
Change goto_first_child_for_{byte,point} to compare nodes' ranges inclusively
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-02-04 12:38:33 -08:00
Max Brunsfeld
919e9745a6
Add ts_tree_cursor_goto_first_child_for_point function
...
This function (and the similar `ts_tree_cursor_goto_first_child_for_byte`)
allows you to efficiently seek the tree cursor to a given position,
exploiting the tree's internal balancing, without having to visit
all of the preceding siblings of each node.
2021-05-27 12:30:19 -07:00
Max Brunsfeld
30e73505e1
Fix handling of extra tokens in ts_tree_cursor_current_field_id
2019-09-04 09:04:31 -07:00
Tuấn-Anh Nguyễn
d96ba09391
Make Tree::changed_ranges return an Iterator instead of a Vec ( #437 )
...
* Make Tree::changed_ranges return an Iterator instead of a Vec
* Remove CBufferIter.free parameter
2019-08-26 19:36:16 -07:00
Max Brunsfeld
c90a532d8f
Update tests to reflect javascript grammar changes
2019-07-10 14:30:43 -05:00
Max Brunsfeld
701d63dab7
Add --edit flag to parse command
2019-04-08 09:21:03 -07:00
Max Brunsfeld
50281637d7
binding: Make parse methods more convenient
...
* Rename parse_str to parse and make it polymorphic.
* Rename parse_utf8 to parse_with, since it is now the callback-based
version of parse
* Add a parse_utf16 method analogous to parse
* Rename existing parse_utf16 method to parse_utf16_with
This brings in the changes from tree-sitter/rust-tree-sitter#5
2019-02-05 10:59:33 -08:00
Max Brunsfeld
d465850aba
Add unit tests for ts_tree_get_changed_ranges
2019-02-02 14:00:11 -08:00
Max Brunsfeld
e26cbb62a5
Add Tree::edit unit tests
2019-01-31 08:15:30 -08:00