code2graph 0.0.0-beta.15

Purpose-neutral code-graph extraction: source files → symbols, references, and cross-file edges. Tree-sitter based, no storage opinion.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: Apache-2.0

//! The [`Resolver`] trait — the tier seam every resolver implements.

use crate::{
    error::Result,
    graph::{CodeGraph, FileFacts},
};

/// Links references to definitions. Pure: no I/O, deterministic.
pub trait Resolver {
    /// Resolve facts into a graph of symbols and confidence-tagged edges.
    ///
    /// Every public resolution entry point validates the supplied facts before
    /// traversing scopes or deriving edges, returning a typed error for malformed
    /// untrusted input.
    fn resolve(&self, files: &[FileFacts]) -> Result<CodeGraph>;
}