Range#
- class tree_sitter.Range(start_point, end_point, start_byte, end_byte)#
A range of positions in a multi-line text document, both in terms of bytes and of rows and columns.
Methods#
- edit(start_byte, old_end_byte, new_end_byte, start_point, old_end_point, new_end_point)#
Edit this range to keep it in-sync with source code that has been edited.
Tip
This is useful for editing ranges without requiring a tree or node instance.
Added in version 0.26.0.
Special Methods#
- __eq__(value, /)#
Implements
self==value.
- __ne__(value, /)#
Implements
self!=value.
- __repr__()#
Implements
repr(self).
- __hash__()#
Implements
hash(self).
Attributes#
- end_byte#
The end byte.
- end_point#
The end point.
- start_byte#
The start byte.
- start_point#
The start point.