8d14da82c508e0ca34e22d964377195f4f3b5277
When expanding macros, the expander may encounter new macro declarations. These need to be stored back into the environment's macro registry so that they are available for subsequent compilation passes or other environments. Persist macros after expansion This commit modifies the `expand` method in `src/ast/environment.rs` to persist macro declarations encountered during expansion. When a macro is expanded, the `Expander` updates its internal registry. This change ensures that the updated registry is then stored back into the `Environment`'s `macro_registry`. This allows subsequent compilations or expansions within the same environment to correctly recognize and utilize these newly defined macros. Additionally, a `NodeKind::Program` case was added to the `CapturePass::transform` method in `src/ast/compiler/captures.rs`. This ensures that expressions within a program node are also recursively transformed, maintaining consistency in the AST processing pipeline.
Description
No description provided
Languages
Rust
100%