From b2d1df300b171b7d4dc19ec4835099b86904c223 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sun, 20 Sep 2026 18:23:22 +0700 Subject: [PATCH] macros.flan says which of the two spellings it is --- test/programs/macros.flan | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/programs/macros.flan b/test/programs/macros.flan index 796e6df..76c9328 100644 --- a/test/programs/macros.flan +++ b/test/programs/macros.flan @@ -5,9 +5,12 @@ ;;;; parsed. What arrives here is the expansion; nothing at run time knows a ;;;; macro was involved. ;;;; -;;;; A macro takes one parameter, the slice of forms written at its call site, -;;;; and answers one form. That is where variadics come from in a language with -;;;; no &rest: (len args) is how many were written. +;;;; Every macro below is written [& args] and picks its arguments apart by +;;;; hand, which is what a macro looked like before parameter lists: & binds +;;;; the whole call as a slice of forms, and (len args) is how many were +;;;; written. macro-params.flan is the other spelling of the same grammar — +;;;; named parameters, [ ] patterns, & only for the tail — and the two files +;;;; are kept apart on purpose, so that each is a whole program in one style. ;; The simplest one there is: two forms, in order. It proves the call site's ;; arguments arrive as forms and come back as code.