StRewriterHelpBrowserPresenter new open
Is the "classic" rewriting syntax documented anywhere?On Mon, 2 Feb 2026 at 22:52, Denis Kudriashov via Pharo-users <pharo-users@lists.pharo.org> wrote:Hi all.This is the release of��BPatterns��project, one of my old ideas on how to make the rewrite engine usable for scripting.As a quick reminder, here is an example of the classic rewrite-engine matching syntax:``@receiver isNil ifTrue: ``@nilBlock
In practice, patterns like this usually live inside string literals���hidden away in lint rules, deprecations, or refactorings.To use them for manual code search or rewriting, you typically need a dedicated tool.Now compare that with the same pattern expressed as a BPattern:[ any isNil ifTrue: anyBlock ] bpatternNo special syntax.
No magical tools.
Just pure Smalltalk.You write a block.
You send#bpattern.
You���re done.
Every editor understands it.
Every tool respects it.Want to see where this pattern appears?��
��[ any isNil ifTrue: anyBlock ] bpattern browseUsers
Want to rewrite all of them?[[ any isNil ifTrue: anyBlock ] -> [ any ifNil: anyBlock ]] brewrite previewBecause BPatterns are real Smalltalk code, all development tools work out of the box:
syntax highlighting, completion, navigation, refactorings.This is the rewrite engine treated as a first-class citizen.
Not strings.
Not tooling sidecars.
Not just for advanced users.
A rewrite engine you can actually use.
A rewrite engine at your fingertips.More details are in the blog post:
And follow the project on GitHub: