TreeSitter::Editor
Inherits Reference / Object
Edit the syntax tree to keep it in sync with source code that has been edited.
You must provide a callback to transform Point coordinates into byte offsets and
byte offsets into Point.
Constructors
new(point_to_offset_callback : Int32, Int32 -> UInt32, offset_to_point_callback : UInt32 -> TreeSitter::Point)
SourceInstance methods
delete(line : Int32, column : Int32, n_bytes : Int32)
Edit the syntax tree at line and column, removing n_bytes.
insert(line : Int32, column : Int32, n_bytes : Int32)
Edit the syntax tree at line and column, adding n_bytes.