pub struct BracketParser { /* private fields */ }
Expand description
A parser that can analyze text to determine if positions are inside or outside brackets.
Implementations§
Source§impl BracketParser
impl BracketParser
Sourcepub fn new() -> Result<Self, String>
pub fn new() -> Result<Self, String>
Creates a new BracketParser instance.
§Returns
A Result containing the new BracketParser or an error if the parser could not be initialized.
Sourcepub fn get_final_state(&mut self, code: &str) -> BracketState
pub fn get_final_state(&mut self, code: &str) -> BracketState
Sourcepub fn get_state_at_position(
&self,
byte_position: usize,
tree: &Tree,
) -> BracketState
pub fn get_state_at_position( &self, byte_position: usize, tree: &Tree, ) -> BracketState
Sourcepub fn get_all_states(&mut self, code: &str) -> Vec<BracketState>
pub fn get_all_states(&mut self, code: &str) -> Vec<BracketState>
Auto Trait Implementations§
impl Freeze for BracketParser
impl RefUnwindSafe for BracketParser
impl Send for BracketParser
impl Sync for BracketParser
impl Unpin for BracketParser
impl UnwindSafe for BracketParser
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