pub struct GenericSemanticAnalyzer { /* private fields */ }Expand description
Generic semantic analyzer that delegates to pluggable providers
Implementations§
Source§impl GenericSemanticAnalyzer
impl GenericSemanticAnalyzer
Sourcepub fn register_provider(&mut self, provider: Box<dyn SemanticAnalyzerProvider>)
pub fn register_provider(&mut self, provider: Box<dyn SemanticAnalyzerProvider>)
Register a semantic analyzer provider
Sourcepub fn registry(&self) -> &SemanticAnalyzerRegistry
pub fn registry(&self) -> &SemanticAnalyzerRegistry
Get the provider registry
Sourcepub fn registry_mut(&mut self) -> &mut SemanticAnalyzerRegistry
pub fn registry_mut(&mut self) -> &mut SemanticAnalyzerRegistry
Get a mutable reference to the provider registry
Sourcepub fn analyze(
&self,
code: &str,
language: &str,
) -> ProviderResult<SemanticInfo>
pub fn analyze( &self, code: &str, language: &str, ) -> ProviderResult<SemanticInfo>
Analyze code using the appropriate provider or fallback
Sourcepub fn extract_symbols(
&self,
code: &str,
language: &str,
) -> ProviderResult<Vec<Symbol>>
pub fn extract_symbols( &self, code: &str, language: &str, ) -> ProviderResult<Vec<Symbol>>
Extract symbols using the appropriate provider or fallback
Sourcepub fn get_hover_info(
&self,
code: &str,
language: &str,
position: Position,
) -> ProviderResult<Option<String>>
pub fn get_hover_info( &self, code: &str, language: &str, position: Position, ) -> ProviderResult<Option<String>>
Get hover information using the appropriate provider or fallback
Sourcepub fn has_provider(&self, language: &str) -> bool
pub fn has_provider(&self, language: &str) -> bool
Check if a provider is registered for a language
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GenericSemanticAnalyzer
impl !RefUnwindSafe for GenericSemanticAnalyzer
impl Send for GenericSemanticAnalyzer
impl Sync for GenericSemanticAnalyzer
impl Unpin for GenericSemanticAnalyzer
impl !UnwindSafe for GenericSemanticAnalyzer
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