pub struct LuaSyntaxTree { /* private fields */ }Implementations§
source§impl LuaSyntaxTree
impl LuaSyntaxTree
pub fn new( root: LuaSyntaxNode, text: String, errors: Vec<LuaParseError>, ) -> Self
pub fn get_red_root(&self) -> &LuaSyntaxNode
pub fn get_chunk_node(&self) -> LuaChunk
pub fn get_line(&self, offset: TextSize) -> Option<usize>
pub fn get_col(&self, offset: TextSize) -> Option<usize>
pub fn get_line_col(&self, offset: TextSize) -> Option<(usize, usize)>
pub fn get_source_text(&self) -> &str
pub fn get_line_count(&self) -> usize
pub fn get_offset(&self, line: usize, col: usize) -> Option<TextSize>
pub fn get_errors(&self) -> &[LuaParseError]
Auto Trait Implementations§
impl Freeze for LuaSyntaxTree
impl !RefUnwindSafe for LuaSyntaxTree
impl !Send for LuaSyntaxTree
impl !Sync for LuaSyntaxTree
impl Unpin for LuaSyntaxTree
impl !UnwindSafe for LuaSyntaxTree
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