Skip to main content

Module pattern

Module pattern 

Source
Expand description

Pattern inference, matching, and validation.

This module contains the core algorithms for:

  • Inference (inferrer): Deriving transformation patterns from before/after example pairs by performing a structural diff of their ASTs.
  • Matching (matcher): Finding occurrences of a pattern in arbitrary source code by comparing AST sub-trees.
  • Validation (validator): Checking that an inferred pattern is well-formed and likely to produce correct transformations.

Re-exports§

pub use inferrer::PatternInferrer;
pub use matcher::PatternMatcher;
pub use validator::PatternValidator;

Modules§

inferrer
Pattern inference engine.
matcher
Pattern matching engine.
validator
Pattern validation.

Structs§

Pattern
Represents an inferred transformation pattern.
PatternVar
Represents a pattern variable that matches any expression or identifier at a particular position in the AST.