pub struct ParsedAst {
pub tree: Tree,
pub nodes: Vec<AstNode>,
pub source: String,
}Expand description
Parsed AST result
Fields§
§tree: TreeThe tree-sitter tree
nodes: Vec<AstNode>Extracted AST nodes
source: StringSource code
Implementations§
Source§impl ParsedAst
impl ParsedAst
Sourcepub fn get_context_for_line(&self, line_idx: usize) -> Option<AstContext>
pub fn get_context_for_line(&self, line_idx: usize) -> Option<AstContext>
Get context for a specific line
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedAst
impl RefUnwindSafe for ParsedAst
impl Send for ParsedAst
impl Sync for ParsedAst
impl Unpin for ParsedAst
impl UnsafeUnpin for ParsedAst
impl UnwindSafe for ParsedAst
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