A Clojure library for correct code walking and macroexpansion that preserves binding information and expands inlined functions.
Riddley is a Clojure library designed for accurate code walking and macroexpansion. It solves problems in standard Clojure tools by correctly handling binding forms, preserving macro environment information, and expanding inlined functions during transformations.
Clojure developers who need to perform pervasive code transformations, write macros that rely on `&env`, or work with inlined functions without breaking their code.
Developers choose Riddley over `clojure.walk` because it provides correct macroexpansion that preserves binding context and expands inlined functions, ensuring transformations are applied safely and consistently across all expression types.
code-walking without caveats
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Preserves &env binding information and expands inlined functions, addressing key limitations in clojure.walk/macroexpand-all for accurate transformations.
Treats binding forms like fn and let differently from expressions to avoid unintended side effects, as highlighted in the README's explanation of pervasive code transformations.
Provides walk-exprs with predicate and handler functions for customizable code walking, allowing developers to specify when and how to transform sub-forms.
Enables access to local bindings via riddley.compiler/locals during transformations, supporting context-aware macroexpansion and composition.
The README links to documentation from 2013, and the library may not be actively maintained, risking compatibility with newer Clojure versions.
Targeted at advanced Clojure metaprogramming, making it less accessible for developers not deeply familiar with macros and code walking intricacies.
As a specialized tool, it might lack extensive examples, tutorials, or integration with modern Clojure ecosystems, increasing the learning curve.