Skip to main content

code_split_core/
semantic.rs

1use crate::builder::GraphBuilder;
2use std::path::Path;
3
4/// Pluggable semantic backend. The single permitted entry point through
5/// which a name-resolving analyzer (e.g. `code-split-sema` backed by `ra_ap_*`)
6/// contributes nodes and edges to a `GraphBuilder`.
7pub trait SemanticIndex {
8    type Error: std::error::Error + Send + Sync + 'static;
9    fn analyze(&self, workspace: &Path, builder: &mut GraphBuilder) -> Result<(), Self::Error>;
10}