Skip to content

refactor: remove syntax-* builtins from global registry and interpreter - #151

Merged
thsfranca merged 1 commit into
mainfrom
refactor/remove-syntax-builtins
Mar 21, 2026
Merged

refactor: remove syntax-* builtins from global registry and interpreter#151
thsfranca merged 1 commit into
mainfrom
refactor/remove-syntax-builtins

Conversation

@thsfranca

Copy link
Copy Markdown
Owner

Summary

  • Remove 7 macro helper builtins (syntax-list, syntax-cons, syntax-first, syntax-rest, syntax-symbol?, syntax-list?, syntax-concat) from builtins.rs
  • Remove their runtime handlers from interpreter.rs
  • Remove GoTranslation::MacroOnly variant from builtins.rs and codegen.rs
  • Macro helpers now exist only in the AST evaluator within macro_expand.rs, matching the updated design

Test plan

  • All 546 tests pass (5 removed syntax-* interpreter tests)
  • cargo clippy -- -D warnings clean
  • Macro expansion tests still pass (helpers live in macro_expand.rs)
  • Integration tests still pass (defmacro compiles end-to-end)

Macro helper functions (syntax-list, syntax-cons, etc.) are
compile-time-only operations that belong exclusively in the AST
evaluator within macro_expand.rs. Remove them from builtins.rs and
interpreter.rs along with the GoTranslation::MacroOnly variant, since
no builtins use it anymore.
@thsfranca
thsfranca enabled auto-merge (squash) March 21, 2026 23:03
@thsfranca
thsfranca merged commit 3b78f49 into main Mar 21, 2026
2 checks passed
@thsfranca
thsfranca deleted the refactor/remove-syntax-builtins branch March 21, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant