abstract class TreeSitter::Editor
- TreeSitter::Editor
- Reference
- Object
Overview
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
.
Direct Known Subclasses
Defined in:
tree_sitter/editor.crConstructors
Instance Method Summary
-
#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.
Constructor Detail
def self.new(point_to_offset_callback : Int32, Int32 -> UInt32, offset_to_point_callback : UInt32 -> TreeSitter::Point)
#
Instance Method Detail
def delete(line : Int32, column : Int32, n_bytes : Int32)
#
Edit the syntax tree at line and column, removing n_bytes.
def insert(line : Int32, column : Int32, n_bytes : Int32)
#
Edit the syntax tree at line and column, adding n_bytes.