vvv_lang/lib.rs
1//! Language support: the parser adapter plus one module per language.
2//!
3//! [`syntax`] is the **only** module that touches `ast_grep_core` nodes; it
4//! turns a language's declarative tables ([`vvv_core::SymbolRule`],
5//! [`vvv_core::ImportGrammar`]) into data. Each language module contributes
6//! a `grammar.rs` (its [`vvv_core::Grammar`] and [`vvv_core::Semantics`]), a
7//! `layout.rs` ([`vvv_core::Layout`]: pure path algebra over a project) and a
8//! `surgery.rs` ([`vvv_core::Surgery`]: text in, edits out), assembled into a
9//! [`syntax::AstGrepLanguage`], with an explicit parser-side navigation selection.
10//! Language modules must not import
11//! `ast_grep_core`, and nothing in this crate touches a file system.
12//!
13//! Languages are compiled in behind Cargo features (`rust`, `typescript`),
14//! each enabling exactly one grammar of `ast-grep-language`.
15
16pub mod syntax;
17
18#[cfg(feature = "rust")]
19pub mod rust;
20#[cfg(feature = "typescript")]
21pub mod typescript;