mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
allow syntax-rules to work with reference patterns
This commit is contained in:
parent
b32e6e15d0
commit
4382b9d3fd
1 changed files with 2 additions and 2 deletions
|
@ -873,8 +873,8 @@
|
||||||
(set! count (+ count 1))
|
(set! count (+ count 1))
|
||||||
(rename (string->symbol (string-append s (%number->string count)))))
|
(rename (string->symbol (string-append s (%number->string count)))))
|
||||||
(define (expand-pattern pat tmpl)
|
(define (expand-pattern pat tmpl)
|
||||||
(let lp ((p (cdr pat))
|
(let lp ((p (if (pair? pat) (cdr pat) pat))
|
||||||
(x (list _cdr _expr))
|
(x (if (pair? pat) (list _cdr _expr) _expr))
|
||||||
(dim 0)
|
(dim 0)
|
||||||
(vars '())
|
(vars '())
|
||||||
(k (lambda (vars)
|
(k (lambda (vars)
|
||||||
|
|
Loading…
Add table
Reference in a new issue