pub struct TsState { /* private fields */ }Expand description
Buffer level tree-sitter state for parsing and highlighting
Implementations§
Source§impl TsState
impl TsState
pub fn try_new( lang: &str, so_dir: &str, query_dir: &str, gb: &GapBuffer, ) -> Result<Self, String>
pub fn edit( &mut self, ch_start: usize, ch_old_end: usize, ch_new_end: usize, gb: &GapBuffer, )
pub fn update(&mut self, gb: &GapBuffer, from: usize, n_rows: usize)
pub fn iter_tokenized_lines_from( &self, line: usize, gb: &GapBuffer, dot_range: Range, load_exec_range: Option<(bool, Range)>, ) -> LineIter<'_> ⓘ
pub fn pretty_print_tree(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TsState
impl RefUnwindSafe for TsState
impl Send for TsState
impl Sync for TsState
impl Unpin for TsState
impl UnwindSafe for TsState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more