Closed jpellegrini closed 1 year ago
Hi @egallesio !
This is probably in your TODO list, but if it isn't, I'm opening an issue: the current let-syntax implementation doesn't work because it calls %find-macro-clause with 4 parameters, and a 5th was added.
let-syntax
%find-macro-clause
stklos> (let-syntax ((f (syntax-rules () ((f) 10)))) (f)) **** Error: find-clause: 5 arguments required in call to `#[closure find-clause]' (4 provided)
Here is the cause:
(define-macro (let-syntax bindings . body) `(%let-syntax ,(map (lambda (x) (let* ((macro-name (car x)) (syn-rules (cadr x)) (keywords (cons macro-name (cadr syn-rules))) (clauses (cddr syn-rules))) `(,macro-name (lambda args (%find-macro-clause ',macro-name args ',keywords ',clauses))))) ;; Here! It should pass the ellipsis symbol too! bindings) ,@body))
The fix would require some rewriting of that macro...
Fixed! :)
Hi @egallesio !
This is probably in your TODO list, but if it isn't, I'm opening an issue: the current
let-syntax
implementation doesn't work because it calls%find-macro-clause
with 4 parameters, and a 5th was added.Here is the cause:
The fix would require some rewriting of that macro...