Skip to main content

brokk_bifrost_ruby/
lib.rs

1//! Ruby language knowledge for Bifrost.
2//!
3//! Internal implementation detail of `brokk-bifrost`; no stability guarantees --
4//! depend on `brokk-bifrost` instead.
5//!
6//! This crate sits between [`brokk_bifrost_core`] and `brokk-bifrost-analysis`.
7//! It holds Ruby *language knowledge* -- the declaration walk, `require` /
8//! `autoload` / Zeitwerk visibility, mixin and dispatch-mode facts, the
9//! structural spec, test detection, semantic diagnostics, and the usage-graph
10//! forward and inverted scans -- as plain functions and data. It depends on no
11//! other Bifrost crate than core, so nothing here may name `IAnalyzer`,
12//! `TreeSitterAnalyzer`, or `RubyAnalyzer`.
13//!
14//! Where analysis code would reach for an analyzer handle, the functions here
15//! take [`graph_support::RubySource`] -- a core
16//! [`brokk_bifrost_core::analyzer::CodeUnitIndex`] plus the memoized Ruby
17//! products the language logic resolves through. `analyzer/ruby/` in
18//! `brokk-bifrost-analysis` keeps the shim: the `RubyAnalyzer` struct with its
19//! three moka caches, nine `OnceLock` cells and one `PoolSafeMemo`, the
20//! accessors that satisfy those traits, the `RubyAdapter` forwarding shell, the
21//! SPI block, and the downcasts that produce the arguments.
22
23pub mod adapter;
24pub mod declarations;
25pub mod diagnostics;
26pub mod graph;
27pub mod graph_support;
28pub mod hierarchy;
29pub mod imports;
30pub mod local_bindings;
31pub mod mixins;
32pub mod queries;
33pub mod structural;
34pub mod syntax;
35pub mod test_detection;