pub trait LanguageBackend: Send + Sync {
// Required methods
fn language(&self) -> LanguageId;
fn extensions(&self) -> &'static [&'static str];
fn analyze_file(
&self,
context: &FileContext<'_>,
source: &str,
) -> FrontendResult<SemanticCallGraph>;
fn analyze_project(
&self,
context: &ProjectContext<'_>,
) -> FrontendResult<SemanticCallGraph>;
}Expand description
A language frontend owns its parser/compiler representation and emits the small semantic call-graph result consumed by DiffKit. This is not a shared compiler AST: language-native AST, Typedtree, and MIR types never leak into the common engine.
Required Methods§
fn language(&self) -> LanguageId
fn extensions(&self) -> &'static [&'static str]
fn analyze_file( &self, context: &FileContext<'_>, source: &str, ) -> FrontendResult<SemanticCallGraph>
fn analyze_project( &self, context: &ProjectContext<'_>, ) -> FrontendResult<SemanticCallGraph>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".