Expand description
Language support: the parser adapter plus one module per language.
syntax is the only module that touches ast_grep_core nodes; it
turns a language’s declarative tables (vvv_core::SymbolRule,
vvv_core::ImportGrammar) into data. Each language module contributes
a grammar.rs (its vvv_core::Grammar and vvv_core::Semantics), a
layout.rs (vvv_core::Layout: pure path algebra over a project) and a
surgery.rs (vvv_core::Surgery: text in, edits out), assembled into a
syntax::AstGrepLanguage, with an explicit parser-side navigation selection.
Language modules must not import
ast_grep_core, and nothing in this crate touches a file system.
Languages are compiled in behind Cargo features (rust, typescript),
each enabling exactly one grammar of ast-grep-language.
Modules§
- rust
- Rust support: grammar and semantics as tables, the Cargo layout as pure
path algebra, and the surgery that spells
usepaths andmodlines. - syntax
- Adapter from
ast-grep-coreto the data-onlyvvv_core::searchmodel. - typescript
- TypeScript support.
.tsand.tsxare distinct grammars, so they are distinct plugins sharing one grammar description.