Skip to main content

LanguageProvider

Trait LanguageProvider 

Source
pub trait LanguageProvider {
    // Required methods
    fn resolve_symbol(
        &self,
        file: &Path,
        name: &str,
    ) -> Result<Vec<SymbolMatch>, AftError>;
    fn list_symbols(&self, file: &Path) -> Result<Vec<Symbol>, AftError>;
}
Expand description

Trait for language-specific symbol resolution.

S02 implements this with tree-sitter parsing via TreeSitterProvider.

Required Methods§

Source

fn resolve_symbol( &self, file: &Path, name: &str, ) -> Result<Vec<SymbolMatch>, AftError>

Resolve a symbol by name within a file. Returns all matches.

Source

fn list_symbols(&self, file: &Path) -> Result<Vec<Symbol>, AftError>

List all top-level symbols in a file.

Implementors§