ryo-pattern 0.1.0

RyoPattern - AST pattern matching and lint rules for Ryo
Documentation
#![warn(missing_docs)]
//! RyoPattern - AST pattern matching and lint rules
//!
//! This crate provides declarative pattern matching for Rust AST nodes,
//! designed for code quality checks and refactoring detection.
//!
//! # Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────┐
//! │  RyoPattern Core                                             │
//! ├─────────────────────────────────────────────────────────────┤
//! │                                                              │
//! │  CodePattern ──────► AST node predicate                     │
//! │       │               (structural matching)                  │
//! │       ▼                                                      │
//! │  Query Extension ──► Symbol filter + body + relations       │
//! │       │                                                      │
//! │       ▼                                                      │
//! │  Rule ─────────────► Query + Message + Severity             │
//! │       │                                                      │
//! │       ▼                                                      │
//! │  MatchResult ──────► Bool + Captures { $VAR: Node }         │
//! │                                                              │
//! └─────────────────────────────────────────────────────────────┘
//! ```
//!
//! # Design Principles
//!
//! 1. **Read-only**: Pattern matching is pure detection; mutations are external
//! 2. **Composable**: `any`/`all`/`none` logical grouping
//! 3. **Schema-Driven**: JSON Schema enables LLM-perfect query generation
//! 4. **Pre-built Graph**: Relation queries use pre-computed graphs

mod code_pattern;
pub mod concrete;
mod diagnostic;
mod engine;
mod generator;
mod loader;
pub mod matcher;
mod relation;
mod rule;

pub use code_pattern::*;
pub use concrete::{parse_pattern, ConcreteParser, ParseError, ParseResult};
pub use diagnostic::*;
pub use engine::*;
pub use generator::{
    GeneratorLoadError, GeneratorLoader, GeneratorMeta, GeneratorTemplate, InsertPosition,
    ParamSpec, RenderError, TemplateSpec,
};
pub use loader::*;
pub use matcher::{BodyScanner, ExprMatcher, MatchContext};
pub use relation::*;
pub use rule::*;