Brummel 8d14da82c5 Persist macros after expansion
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.
2026-03-31 17:11:57 +02:00
2026-03-30 15:41:25 +02:00
2026-03-31 17:11:57 +02:00
2026-03-31 15:22:51 +02:00
2026-03-30 15:41:25 +02:00
2026-03-30 15:41:25 +02:00
2026-03-15 22:40:45 +01:00
S
Description
No description provided
6.5 MiB
Languages
Rust 100%