pub struct AstEngine { /* private fields */ }
Expand description
Main AST engine for AGCodex
Implementations§
Source§impl AstEngine
impl AstEngine
Sourcepub fn new(compression_level: CompressionLevel) -> Self
pub fn new(compression_level: CompressionLevel) -> Self
Create a new AST engine with specified compression level
Sourcepub async fn parse_file(&self, path: &Path) -> AstResult<ParsedAst>
pub async fn parse_file(&self, path: &Path) -> AstResult<ParsedAst>
Parse a file and return its AST
Sourcepub async fn compact_code(&self, path: &Path) -> AstResult<String>
pub async fn compact_code(&self, path: &Path) -> AstResult<String>
Compact code using AI Distiller-style compression
Sourcepub async fn search_symbols(&self, query: &str) -> AstResult<Vec<Symbol>>
pub async fn search_symbols(&self, query: &str) -> AstResult<Vec<Symbol>>
Search for symbols across the codebase
Sourcepub async fn get_call_graph(
&self,
path: &Path,
function_name: &str,
) -> AstResult<Vec<Symbol>>
pub async fn get_call_graph( &self, path: &Path, function_name: &str, ) -> AstResult<Vec<Symbol>>
Get call graph for a function
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clear the cache
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AstEngine
impl !RefUnwindSafe for AstEngine
impl Send for AstEngine
impl Sync for AstEngine
impl Unpin for AstEngine
impl !UnwindSafe for AstEngine
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