pub struct BufferParser { /* private fields */ }Expand description
Parser state for a single buffer
Implementations§
Source§impl BufferParser
impl BufferParser
Sourcepub fn new(language: &Language, language_id: &str) -> Option<Self>
pub fn new(language: &Language, language_id: &str) -> Option<Self>
Create a new parser for the given language
Returns None if parser setup fails
Sourcepub fn language_id(&self) -> &str
pub fn language_id(&self) -> &str
Get the language ID
Sourcepub fn parse_full(&mut self, content: &str) -> Option<&Tree>
pub fn parse_full(&mut self, content: &str) -> Option<&Tree>
Perform a full parse of the buffer content
This replaces any existing parse tree
Auto Trait Implementations§
impl Freeze for BufferParser
impl RefUnwindSafe for BufferParser
impl Send for BufferParser
impl Sync for BufferParser
impl Unpin for BufferParser
impl UnwindSafe for BufferParser
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