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§
Sourcefn analyze(&self, code: &str) -> SemanticResult<SemanticInfo>
fn analyze(&self, code: &str) -> SemanticResult<SemanticInfo>
Analyze code and extract semantic information
Sourcefn extract_symbols(&self, code: &str) -> SemanticResult<Vec<Symbol>>
fn extract_symbols(&self, code: &str) -> SemanticResult<Vec<Symbol>>
Extract symbols from code
Sourcefn get_hover_info(
&self,
code: &str,
position: Position,
) -> SemanticResult<Option<String>>
fn get_hover_info( &self, code: &str, position: Position, ) -> SemanticResult<Option<String>>
Get hover information at a specific position