BPatterns: Rewrite Engine with Smalltalk Style
Summary
This article introduces BPatterns, a Smalltalk-native DSL that wraps the Pharo rewrite engine to enable AST-level pattern matching through ordinary blocks. It highlights the benefits of a block-based API over the engine's string syntax, demonstrates several example patterns, and discusses debugging and tooling integration. It also points to the GitHub repo and a forthcoming post on a deprecation API built on top of BPatterns.