Skip to main content

lean_ctx_syntax/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2
3//! Tree-sitter based code-structure layer for LeanCTX | OSS.
4//!
5//! Signature extraction (tree-sitter primary, regex fallback), deep AST
6//! queries (imports, calls, type definitions and uses), import-to-file
7//! resolution, the post-edit syntax gate and stack-safe AST traversal.
8//! Everything here is a pure function of source text and, for import
9//! resolution, the project files. Engine concerns (persistent telemetry,
10//! configuration, sessions) stay in the engine, which reaches this crate
11//! through facades under `core::`, so this crate never depends on the engine.
12//!
13//! The `tree-sitter` feature compiles the grammars in. Without it, signature
14//! extraction uses the regex fallback and the AST queries return nothing.
15//! `grammar-ocaml`, `grammar-haskell` and `grammar-julia` (or
16//! `grammars-long-tail`) add the opt-in long-tail grammars.
17
18pub mod ast_walk;
19#[cfg(feature = "tree-sitter")]
20pub mod chunk_grammar;
21pub mod deep_queries;
22pub mod import_resolver;
23pub mod signatures;
24#[cfg(feature = "tree-sitter")]
25pub mod signatures_ts;
26pub mod syntax_validate;