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]
Trait Implementations§
Source§impl Clone for LuaSyntaxTree
impl Clone for LuaSyntaxTree
Source§fn clone(&self) -> LuaSyntaxTree
fn clone(&self) -> LuaSyntaxTree
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)