SemanticAnalyzer

Trait SemanticAnalyzer 

Source
pub trait SemanticAnalyzer: Send + Sync {
    // Required methods
    fn analyze(&self, code: &str) -> SemanticResult<SemanticInfo>;
    fn extract_symbols(&self, code: &str) -> SemanticResult<Vec<Symbol>>;
    fn get_hover_info(
        &self,
        code: &str,
        position: Position,
    ) -> SemanticResult<Option<String>>;
    fn language(&self) -> Language;
}
Expand description

Trait for semantic analysis of code

Required Methods§

Source

fn analyze(&self, code: &str) -> SemanticResult<SemanticInfo>

Analyze code and extract semantic information

Source

fn extract_symbols(&self, code: &str) -> SemanticResult<Vec<Symbol>>

Extract symbols from code

Source

fn get_hover_info( &self, code: &str, position: Position, ) -> SemanticResult<Option<String>>

Get hover information at a specific position

Source

fn language(&self) -> Language

Get supported language

Implementors§